]> git.proxmox.com Git - mirror_ubuntu-jammy-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)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 16 Sep 2022 08:52:19 +0000 (10:52 +0200)
commitb5691848893012c68ca79579d682245a5f91c361
tree253499050d97cdc09aa868b63f6909348f784e75
parent5df55999a279bab1a3134960f99fa09b78b1c57b
io_uring: avoid io-wq -EAGAIN looping for !IOPOLL

BugLink: https://bugs.launchpad.net/bugs/1987451
[ Upstream commit e0deb6a025ae8c850dc8685be39fb27b06c88736 ]

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: def596e9557c9 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
fs/io_uring.c