Skip to content

Fix read/write -EAGAIN failure cases

Jens Axboe io-uring linux-nvme linux-scsi 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3io_uring/rw: use io_rw_recycle() from cleanup pathio_uring/rw.c+2 -10 replies
2/3io_uring/rw: handle -EAGAIN retry at IO completion timeio_uring/io_uring.c io_uring/rw.c+38 -574 replies
3/3io_uring/rw: don't gate retry on completion contextio_uring/rw.c+0 -60 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCHSET for-next 0/3] Fix read/write -EAGAIN failure cases

Hi,

After I had originally ensured that all read/write requests were fully retryable (with the 6.10 "always allocate async data" changes), there was an attempt or two at getting rid of these -EAGAIN's bubbling back to userspace. See:

commit 039a2e800bcd5beb89909d1a488abf3d647642cf

Author: Jens Axboe <[email protected]>
Date:   Thu Apr 25 09:04:32 2024 -0600

io_uring/rw: reinstate thread check for retries

and the other two commits it references.

Here's another attempt, which simply moves this kind of checking to be at completion time. This solves the issue of REQ_F_REISSUE being missed in case it gets sets outside of submission context, and generally just cleans up the random REQ_F_REISSUE checking that otherwise needs to happen for the read/write issue path.

Patch 1 is just a cleanup, patch 2 does the actual change, and patch 3 finally removes the thread group checking in the "Can I resubmit" checks.

 io_uring/io_uring.c | 15 +++++++-
 io_uring/rw.c       | 89 ++++++++++++++-------------------------------
 2 files changed, 40 insertions(+), 64 deletions(-)
Signature · 1 line
Jens Axboe