You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brpc.apache.org by "gamezhoulei (via GitHub)" <gi...@apache.org> on 2024/08/24 12:51:42 UTC
[I] 请问一下, brpc和spdk框架一起使用的时候, 二者的线程模型会相互影响么 (brpc)
gamezhoulei opened a new issue, #2745:
URL: https://github.com/apache/brpc/issues/2745
各位大佬, 请问一下, brpc和spdk框架一起使用的时候, 二者的线程模型会相互影响么
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org
Re: [I] 请问一下, brpc和spdk框架一起使用的时候, 二者的线程模型会相互影响么 (brpc)
Posted by "gamezhoulei (via GitHub)" <gi...@apache.org>.
gamezhoulei commented on issue #2745:
URL: https://github.com/apache/brpc/issues/2745#issuecomment-2317196958
> 可以的,brpc有个函数: // Add a startup function that each pthread worker will run at the beginning // To run code at the end, use butil::thread_atexit() // Returns 0 on success, error code otherwise. extern int bthread_set_worker_startfn(void (*start_fn)());
>
> // Add a startup function with tag extern int bthread_set_tagged_worker_startfn(void (*start_fn)(bthread_tag_t));
>
> 可以在这个函数里面完成绑核的工作。
好的, 感谢. 只要我spdk和brpc设置不同的core, 就好了.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org
Re: [I] 请问一下, brpc和spdk框架一起使用的时候, 二者的线程模型会相互影响么 (brpc)
Posted by "yanglimingcn (via GitHub)" <gi...@apache.org>.
yanglimingcn commented on issue #2745:
URL: https://github.com/apache/brpc/issues/2745#issuecomment-2311409511
看你想怎么用了,
1、将brpc的worker线程池和spdk的线程独立开。
2、使用一个队列,形成生产者消费者,把spdk作为一个单线程的消费者。
3、worker线程和spdk是同一个线程,这种情况下需要对brpc做一些改造了。
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org
Re: [I] 请问一下, brpc和spdk框架一起使用的时候, 二者的线程模型会相互影响么 (brpc)
Posted by "yanglimingcn (via GitHub)" <gi...@apache.org>.
yanglimingcn commented on issue #2745:
URL: https://github.com/apache/brpc/issues/2745#issuecomment-2316928685
可以的,brpc有个函数:
// Add a startup function that each pthread worker will run at the beginning
// To run code at the end, use butil::thread_atexit()
// Returns 0 on success, error code otherwise.
extern int bthread_set_worker_startfn(void (*start_fn)());
// Add a startup function with tag
extern int bthread_set_tagged_worker_startfn(void (*start_fn)(bthread_tag_t));
可以在这个函数里面完成绑核的工作。
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org
Re: [I] 请问一下, brpc和spdk框架一起使用的时候, 二者的线程模型会相互影响么 (brpc)
Posted by "gamezhoulei (via GitHub)" <gi...@apache.org>.
gamezhoulei closed issue #2745: 请问一下, brpc和spdk框架一起使用的时候, 二者的线程模型会相互影响么
URL: https://github.com/apache/brpc/issues/2745
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org
Re: [I] 请问一下, brpc和spdk框架一起使用的时候, 二者的线程模型会相互影响么 (brpc)
Posted by "gamezhoulei (via GitHub)" <gi...@apache.org>.
gamezhoulei commented on issue #2745:
URL: https://github.com/apache/brpc/issues/2745#issuecomment-2316903587
> 看你想怎么用了, 1、将brpc的worker线程池和spdk的线程独立开。 2、使用一个队列,形成生产者消费者,把spdk作为一个单线程的消费者。 3、worker线程和spdk是同一个线程,这种情况下需要对brpc做一些改造了。
独立开来, brpc可以绑定到对应的core么
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org