io_uring: wake up optimisations
authorPavel Begunkov <asml.silence@gmail.com>
Mon, 9 Jan 2023 14:46:10 +0000 (14:46 +0000)
committerJens Axboe <axboe@kernel.dk>
Sun, 29 Jan 2023 22:17:40 +0000 (15:17 -0700)
commit3181e22fb79910c7071e84a43af93ac89e8a7106
treee5015f75d3d39aa9301f8b629fb57df742cc1333
parentbca39f39058567643487cd654970717705784ba3
io_uring: wake up optimisations

Flush completions is done either from the submit syscall or by the
task_work, both are in the context of the submitter task, and when it
goes for a single threaded rings like implied by ->task_complete, there
won't be any waiters on ->cq_wait but the master task. That means that
there can be no tasks sleeping on cq_wait while we run
__io_submit_flush_completions() and so waking up can be skipped.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/60ad9768ec74435a0ddaa6eec0ffa7729474f69f.1673274244.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/io_uring.c