]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitb696b81dbd1c97e3c9aa29a1fc0c5f1f05add523
treebfe76d6586ca8fbbfb5aa5f760558392cd10a1b0
parent9d298f10f86746216ffe033e5f3f66ca8f0a3140
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