io_uring: optimise locking for local tw with submit_wait
authorPavel Begunkov <asml.silence@gmail.com>
Thu, 6 Oct 2022 20:42:33 +0000 (21:42 +0100)
committerJens Axboe <axboe@kernel.dk>
Fri, 7 Oct 2022 18:25:31 +0000 (12:25 -0600)
commit4bb75ea40e3d8fe21d10da93ba3b3a2edae18eb0
treeee242f9fe480b5219f967a47d2feb50f17574017
parent2a97bb7a223c8a8bcb1f90191c1fdd731c367e48
io_uring: optimise locking for local tw with submit_wait

Running local task_work requires taking uring_lock, for submit + wait we
can try to run them right after submit while we still hold the lock and
save one lock/unlokc pair. The optimisation was implemented in the first
local tw patches but got dropped for simplicity.

Suggested-by: Dylan Yudaken <dylany@fb.com>
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/281fc79d98b5d91fe4778c5137a17a2ab4693e5c.1665088876.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/io_uring.c
io_uring/io_uring.h