Skip to content

RFC Add ability to ignore inline completions

Jens Axboe io-uring 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest3 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3io_uring: add support for ignoring inline completions for waitsinclude/linux/io_uring_types.h include/uapi/linux/io_uring.h io_uring/io_uring.c +1 more+16 -30 replies
2/3io_uring/net: add IORING_SEND_IGNORE_INLINE support to send/sendmsginclude/uapi/linux/io_uring.h io_uring/net.c+15 -10 replies
3/3io_uring/net: add IORING_SEND_IGNORE_INLINE support to zerocopy sendio_uring/net.c+6 -10 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCHSET RFC 0/3] Add ability to ignore inline completions

Hi,

For request/response type scenarios, it's not uncommon to have the send/write be of less interesting than new incoming recv/reads. Yet it's not quite possible to wait for only recv/reads when an application does:

io_uring_submit_and_wait(ring, nr_to_wait_for);

or any of the other variants of submit_and_wait() helpers. The application may attempt to count up the sends manually and include them in the 'nr_to_wait_for', however even that isn't infallible as that would also ignore failed/short sends/writes.

This adds support for ignoring inline completions. Note that while this doesn't catch all scenarios where a send/write can complete, it does catch the interesting ones - the ones that complete fully as part of normal submission. With that, it's possible to simply ignore the expected inline completions that naturally happen as part of a submit and wait scenario.

Patch 1 adds the general simple infrastructure for this, and patch 2+3 adds support for send/sendmsg/sendzc. For those, they have to set a send specific flag, IORING_SEND_IGNORE_INLINE, to have it be enabled for those requests.

Comments welcome!

 include/linux/io_uring_types.h |  4 ++++
 include/uapi/linux/io_uring.h  |  8 ++++++++
 io_uring/io_uring.c            | 12 +++++++++---
 io_uring/io_uring.h            |  2 ++
 io_uring/net.c                 | 16 ++++++++++++++--
 5 files changed, 37 insertions(+), 5 deletions(-)
Signature · 1 line
Jens Axboe