]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: move finish_wait() outside of loop in cqring_wait()
authorJens Axboe <axboe@kernel.dk>
Fri, 25 Mar 2022 22:39:57 +0000 (16:39 -0600)
committerJens Axboe <axboe@kernel.dk>
Sun, 24 Apr 2022 23:34:19 +0000 (17:34 -0600)
commit1d610f70493aaa0e32db6964e4db31b45b09b2ea
tree3905d2c906de038153132a211330dd2dbc3dc011
parentb1cf0b2bb7a8f381f75e6020e2b1d359368d5bd5
io_uring: move finish_wait() outside of loop in cqring_wait()

We don't need to call this for every loop. This is particularly
troublesome if we are task_work intensive, and get woken more often than
we desire due to that.

Just do it at the end, that's always safe as we initialize the waitqueue
list head anyway. This can save a considerable amount of hammering on
the waitqueue lock, which is also hot from the request completion side.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c