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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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(-)

-- 
Jens Axboe





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux