public inbox for [email protected]
 help / color / mirror / Atom feed
From: Jens Axboe <[email protected]>
To: [email protected]
Subject: [PATCHSET RFC 0/4] Coalesce provided buffer segments
Date: Mon, 12 Aug 2024 10:55:23 -0600	[thread overview]
Message-ID: <[email protected]> (raw)

Hi,

When selecting provided buffers for a send/recv for bundles, there's
no reason why the number of buffers selected is the same as the mapped
segments that will be passed to send/recv. If some (or all) of these
buffers are virtually contigious, then they can get collapsed into much
fewer segments. Sometimes even just a single segment. This avoids costly
iteration on the send/recv processing side.

The return value is the number of bytes sent/received, and the starting
buffer ID where the operation begun. This is again identical to how
bundles work, from the application point of view this doesn't change
anything in terms of how send/recv bundles are handled, hence this is
a transparent feature.

Patch 1-3 are just basic prep patches, and patch 4 allows for actual
coalescing of segments. This is only enabled for bundles, as those are
the types of requests that process multiple buffers in a single
operation.

Patches are on top of 6.11-rc3 with pending io_uring patches, as well
as the incremental buffer consumption patches [1] posted earlier today.

 io_uring/kbuf.c | 71 ++++++++++++++++++++++++++++++++++++++++++-------
 io_uring/kbuf.h |  7 +++--
 io_uring/net.c  | 55 +++++++++++++++++---------------------
 io_uring/net.h  |  1 +
 4 files changed, 91 insertions(+), 43 deletions(-)

-- 
Jens Axboe


             reply	other threads:[~2024-08-12 17:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-12 16:55 Jens Axboe [this message]
2024-08-12 16:55 ` [PATCH 1/4] io_uring/kbuf: have io_provided_buffers_select() take buf_sel_arg Jens Axboe
2024-08-12 16:55 ` [PATCH 2/4] io_uring/net: pass in io_kiocb to io_bundle_nbufs() Jens Axboe
2024-08-12 16:55 ` [PATCH 3/4] io_uring/kbuf: shrink nr_iovs/mode in struct buf_sel_arg Jens Axboe
2024-08-12 16:55 ` [PATCH 4/4] io_uring/net: allow coalescing of mapped segments Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    [email protected] \
    [email protected] \
    [email protected] \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox