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, 24 Apr 2022 23:34:16 +0000 (17:34 -0600)
commitd487b43cd3276e40723641510cbd2d33da4f6800
treebfe76d6586ca8fbbfb5aa5f760558392cd10a1b0
parent773697b610bff9451cf67d4f57b08d68c4b1a832
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