Re: [I] bthread可以只在特定的pthread_worker吗上执行吗? (brpc)
MJY-HUST commented on issue #2507: URL: https://github.com/apache/brpc/issues/2507#issuecomment-1897706695 > > 场景是:server中会处理一些io任务。每个pthread worker维护一个thread local IO_uring实例用于提交和收割IO,使用server收到rpc请求后直接基于bthread来处理,此时,对于每个pthread worker想维护一个定时任务,用于提交请求。 如果可以直接在server 处理逻辑对应的pthread上执行绑定的bthread任务,可以避免额外线程的创建 > > 为啥要一个定时器提交请求,收到rpc请求,直接提交到当前thread local的io_uring就可以了吧 说错了,是收割请求。整体的逻辑是提交请求后让bthread sleep,然后收割请求后使用bthread_t来唤醒sleep的bthread继续执行。想让每个task group 所在的pthread固定周期执行收割请求的任务。 -- 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-unsubscr...@brpc.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org For additional commands, e-mail: dev-h...@brpc.apache.org
Re: [I] bthread可以只在特定的pthread_worker吗上执行吗? (brpc)
yanglimingcn commented on issue #2507: URL: https://github.com/apache/brpc/issues/2507#issuecomment-1895942738 > 场景是:server中会处理一些io任务。每个pthread worker维护一个thread local IO_uring实例用于提交和收割IO,使用server收到rpc请求后直接基于bthread来处理,此时,对于每个pthread worker想维护一个定时任务,用于提交请求。 如果可以直接在server 处理逻辑对应的pthread上执行绑定的bthread任务,可以避免额外线程的创建 为啥要一个定时器提交请求,收到rpc请求,直接提交到当前thread local的io_uring就可以了吧 -- 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-unsubscr...@brpc.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org For additional commands, e-mail: dev-h...@brpc.apache.org
Re: [I] bthread可以只在特定的pthread_worker吗上执行吗? (brpc)
chenBright commented on issue #2507: URL: https://github.com/apache/brpc/issues/2507#issuecomment-1891646836 目前应该没法支持绑定处理请求的worker pthread。 -- 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-unsubscr...@brpc.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org For additional commands, e-mail: dev-h...@brpc.apache.org
Re: [I] bthread可以只在特定的pthread_worker吗上执行吗? (brpc)
MJY-HUST commented on issue #2507: URL: https://github.com/apache/brpc/issues/2507#issuecomment-1891619650 场景是:server中会处理一些io任务。每个pthread worker维护一个thread local IO_uring实例用于提交和收割IO,使用server收到rpc请求后直接基于bthread来处理,此时,对于每个pthread worker想维护一个定时任务,用于提交请求。 -- 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-unsubscr...@brpc.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org For additional commands, e-mail: dev-h...@brpc.apache.org
Re: [I] bthread可以只在特定的pthread_worker吗上执行吗? (brpc)
chenBright commented on issue #2507: URL: https://github.com/apache/brpc/issues/2507#issuecomment-1891553034 直接在pthread上执行就行了吧,有必要用bthread吗? -- 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-unsubscr...@brpc.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org For additional commands, e-mail: dev-h...@brpc.apache.org