On Mon, 2021-06-07 at 16:26 -0400, Olivier Langlois wrote: > In __io_queue_sqe(): > a) io_issue_sqe() returns EAGAIN > b) in between io_issue_sqe() call and vfs_poll() call done inside > io_arm_poll_handler(), data becomes available > c) io_arm_poll_handler() returns false because vfs_poll() did return > an > non-empty mask. > > I am throwing this idea to the group. > Would it be a good idea to detect that situation and recall > io_issue_sqe() in that case instead of pushing the request to the io- > wq? > > On busy TCP sockets, this scenario seems to happen very often (ie: > few > times every second) I didn't wait for an answer and I went straight to trying out an io_uring modification. It works like a charm. My code is using io_uring like a maniac and with the modification, zero io worker threads get created. That means a definite gain in terms of latency... I will send out a patch soon to share this discovery with io_uring devs. Greetings,