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>
Wed, 11 Jan 2023 17:25:35 +0000 (10:25 -0700)
commitef3ddc6ac629fc829ed6e08418e1c070332dde63
tree502f6ccf388690f8842ece20fadbab711ebdb7c9
parente05f6f47bf8aed0e97d9ba1d52e2a10ea542609c
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