mbox series

[PATCHSET,0/4] Limit multishot receive retries

Message ID 20240129203025.3214152-1-axboe@kernel.dk (mailing list archive)
Headers show
Series Limit multishot receive retries | expand

Message

Jens Axboe Jan. 29, 2024, 8:23 p.m. UTC
Hi,

If we have multiple receive multishots pending and one/several/all of
the clients are flooding us with traffic, then we can retry each
multishot receive many times as we keep having data available. Some
quick testing here with 8 clients over a 10gbit link, I saw one client
do more than 32K retries. This causes an imbalance in how we serve
traffic like that, with the result being that each client will see
different throughput.

1-2 are just prep patches, no functional changes. Patch 3 doesn't do
anything by itself, but it enables the fix that is in patch 4. That
patch limits retries to 32, which should be enough to not cause any
extra overhead, while still allowing other clients to be processed
fairly.

 io_uring/io_uring.h |  8 +++++++-
 io_uring/net.c      | 49 ++++++++++++++++++++++++++++++++-------------
 io_uring/poll.c     | 49 ++++++++++++++++++++++++++-------------------
 3 files changed, 70 insertions(+), 36 deletions(-)