io_uring: optimise mutex locking for submit+iopoll
authorPavel Begunkov <asml.silence@gmail.com>
Tue, 22 Mar 2022 14:07:58 +0000 (14:07 +0000)
committerJens Axboe <axboe@kernel.dk>
Sun, 17 Apr 2022 22:51:24 +0000 (16:51 -0600)
commit8346c5039c86720e7257a5a905fb5c4439c7435c
tree0a34c6616a033897497d638f4ee19c41e867a561
parent4ad4b96ef39c240e5bd7ea5775d0652b02a6c85f
io_uring: optimise mutex locking for submit+iopoll

Both submittion and iopolling requires holding uring_lock. IOPOLL can
users do them together in a single syscall, however it would still do 2
pairs of lock/unlock. Optimise this case combining locking into one
lock/unlock pair, which especially nice for low QD.

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