diff options
author | Jens Axboe <axboe@kernel.dk> | 2024-01-29 12:00:58 -0700 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2024-01-29 13:19:58 -0700 |
commit | 76b367a2d83163cf19173d5cb0b562acbabc8eac (patch) | |
tree | f179f216aa4d89de9b45a81b85f436640588fbcd /include/ufs | |
parent | 704ea888d646cb9d715662944cf389c823252ee0 (diff) |
io_uring/net: limit inline multishot retries
If we have multiple clients and some/all are flooding the receives to
such an extent that we can retry a LOT handling multishot receives, then
we can be starving some clients and hence serving traffic in an
imbalanced fashion.
Limit multishot retry attempts to some arbitrary value, whose only
purpose serves to ensure that we don't keep serving a single connection
for way too long. We default to 32 retries, which should be more than
enough to provide fairness, yet not so small that we'll spend too much
time requeuing rather than handling traffic.
Cc: stable@vger.kernel.org
Depends-on: 704ea888d646 ("io_uring/poll: add requeue return code from poll multishot handling")
Depends-on: 1e5d765a82f ("io_uring/net: un-indent mshot retry path in io_recv_finish()")
Depends-on: e84b01a880f6 ("io_uring/poll: move poll execution helpers higher up")
Fixes: b3fdea6ecb55 ("io_uring: multishot recv")
Fixes: 9bb66906f23e ("io_uring: support multishot in recvmsg")
Link: https://github.com/axboe/liburing/issues/1043
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/ufs')
0 files changed, 0 insertions, 0 deletions