]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: avoid io-wq -EAGAIN looping for !IOPOLL
authorPavel Begunkov <asml.silence@gmail.com>
Fri, 13 May 2022 10:24:56 +0000 (11:24 +0100)
committerJens Axboe <axboe@kernel.dk>
Fri, 13 May 2022 12:50:42 +0000 (06:50 -0600)
commit3617da32d549e31c2ee38452e358481c2995530a
treef3f6e4af01512eefa04dc65d2d2d8f5f1e893693
parent44188e5642387ba430b5a26c8ed7fd0f8421e19e
io_uring: avoid io-wq -EAGAIN looping for !IOPOLL

If an opcode handler semi-reliably returns -EAGAIN, io_wq_submit_work()
might continue busily hammer the same handler over and over again, which
is not ideal. The -EAGAIN handling in question was put there only for
IOPOLL, so restrict it to IOPOLL mode only where there is no other
recourse than to retry as we cannot wait.

Fixes: 24e73e9eaf2d8 ("io_uring: support for IO polling")
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/f168b4f24181942f3614dd8ff648221736f572e6.1652433740.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c