io_uring: remove looping around handling traditional task_work
authorJens Axboe <axboe@kernel.dk>
Tue, 30 Jan 2024 14:00:47 +0000 (07:00 -0700)
committerJens Axboe <axboe@kernel.dk>
Thu, 8 Feb 2024 20:27:06 +0000 (13:27 -0700)
commit592b4805432af075468876771c0f7d41273ccb3c
tree9f02015aaab20f754af1b4ed101cb35380ae21dd
parent8435c6f380d622639d8acbc0af585d941396fa57
io_uring: remove looping around handling traditional task_work

A previous commit added looping around handling traditional task_work
as an optimization, and while that may seem like a good idea, it's also
possible to run into application starvation doing so. If the task_work
generation is bursty, we can get very deep task_work queues, and we can
end up looping in here for a very long time.

One immediately observable problem with that is handling network traffic
using provided buffers, where flooding incoming traffic and looping
task_work handling will very quickly lead to buffer starvation as we
keep running task_work rather than returning to the application so it
can handle the associated CQEs and also provide buffers back.

Fixes: 3a0c037b0e16 ("io_uring: batch task_work")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/io_uring.c