mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 10:58:48 +09:00
io_uring: avoid io-wq -EAGAIN looping for !IOPOLL
[ Upstream commite0deb6a025] 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:def596e955("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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
b3cec8a42f
commit
51ebf1b6a0
@@ -6866,7 +6866,7 @@ static void io_wq_submit_work(struct io_wq_work *work)
|
||||
* forcing a sync submission from here, since we can't
|
||||
* wait for request slots on the block side.
|
||||
*/
|
||||
if (ret != -EAGAIN)
|
||||
if (ret != -EAGAIN || !(req->ctx->flags & IORING_SETUP_IOPOLL))
|
||||
break;
|
||||
cond_resched();
|
||||
} while (1);
|
||||
|
||||
Reference in New Issue
Block a user