royguo commented on PR #3168:
URL: https://github.com/apache/brpc/pull/3168#issuecomment-3635114160

   > If the request is submitted to the local io_uring function in pthread1, 
this bthread may be scheduled to pthread2 later. In this case, pthread1 still 
needs to reap the corresponding CQE and then notify it.
   
   I am not sure if I understand your comment correctly.
   
   1. bthread1 (under taskgroup1/pthread1) submitted to iouring1 (which is 
bound to taskgroup1)
   2. bthread1 `butex.wait`, for future wake up.
   3. inside task group1's idle function, it reap iouring1 and get cqe, then 
notify bthread1 by `butex.signal`
   
   I assume the `3`th step will put bthread1 to current taskgroup 
(taskgroup1)'s locak rq_, and `taskgroup1` will pop `rq_` inside the main loop 
instead of using `remote_rq_` (which may introduce thread futex).
   
   
   I am new to brpc, so correct me if i understand incorreclty, thanks.
   
   
   BTW, the idle function here is only useful when there's only a few requests, 
to make sure we can reap the `last one` bthread. If we have heavy concurrency 
requests, we will use the working bthread reaping previous submitted IOs, 
insteand of waiting for the idle function. So even if we cannot avoid cross 
wake up inside the idle function, it will be ok.


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to