public inbox for [email protected]
 help / color / mirror / Atom feed
From: Pavel Begunkov <[email protected]>
To: [email protected]
Cc: [email protected], Andres Freund <[email protected]>
Subject: [PATCH v2 0/9] Add support for vectored registered buffers
Date: Tue,  4 Mar 2025 15:40:21 +0000	[thread overview]
Message-ID: <[email protected]> (raw)

Add registered buffer support for vectored io_uring operations. That
allows to pass an iovec, all entries of which must belong to and
point into the same registered buffer specified by sqe->buf_index.

The series covers zerocopy sendmsg and reads / writes. Reads and
writes are implemented as new opcodes, while zerocopy sendmsg
reuses IORING_RECVSEND_FIXED_BUF for the api.

Results are aligned to what one would expect from registered buffers:

t/io_uring + nullblk, single segment 16K:
  34 -> 46 GiB/s
examples/send-zerocopy.c default send size (64KB):
  82558 -> 123855 MB/s

The series is placed on top of 6.15 + zcrx.

liburing + tests:
https://github.com/isilence/liburing.git regbuf-import

v2:
    Nowarn alloc
    Cap bvec caching
    Check length overflow
    Reject 0 len segments
    Other minor changes

Pavel Begunkov (9):
  io_uring: introduce struct iou_vec
  io_uring: add infra for importing vectored reg buffers
  io_uring/rw: implement vectored registered rw
  io_uring/rw: defer reg buf vec import
  io_uring/net: combine msghdr copy
  io_uring/net: pull vec alloc out of msghdr import
  io_uring/net: convert to struct iou_vec
  io_uring/net: implement vectored reg bufs for zctx
  io_uring: cap cached iovec/bvec size

 include/linux/io_uring_types.h |  11 ++
 include/uapi/linux/io_uring.h  |   2 +
 io_uring/alloc_cache.h         |   9 --
 io_uring/net.c                 | 180 +++++++++++++++++++++------------
 io_uring/net.h                 |   6 +-
 io_uring/opdef.c               |  39 +++++++
 io_uring/rsrc.c                | 131 ++++++++++++++++++++++++
 io_uring/rsrc.h                |  24 +++++
 io_uring/rw.c                  |  99 ++++++++++++++++--
 io_uring/rw.h                  |   6 +-
 10 files changed, 415 insertions(+), 92 deletions(-)

-- 
2.48.1


             reply	other threads:[~2025-03-04 15:39 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-04 15:40 Pavel Begunkov [this message]
2025-03-04 15:40 ` [PATCH v2 1/9] io_uring: introduce struct iou_vec Pavel Begunkov
2025-03-04 15:40 ` [PATCH v2 2/9] io_uring: add infra for importing vectored reg buffers Pavel Begunkov
2025-03-07 14:07   ` Pavel Begunkov
2025-03-07 14:14     ` Jens Axboe
2025-03-04 15:40 ` [PATCH v2 3/9] io_uring/rw: implement vectored registered rw Pavel Begunkov
2025-03-04 15:40 ` [PATCH v2 4/9] io_uring/rw: defer reg buf vec import Pavel Begunkov
2025-03-04 15:40 ` [PATCH v2 5/9] io_uring/net: combine msghdr copy Pavel Begunkov
2025-03-04 15:40 ` [PATCH v2 6/9] io_uring/net: pull vec alloc out of msghdr import Pavel Begunkov
2025-03-04 15:40 ` [PATCH v2 7/9] io_uring/net: convert to struct iou_vec Pavel Begunkov
2025-03-04 15:40 ` [PATCH v2 8/9] io_uring/net: implement vectored reg bufs for zctx Pavel Begunkov
2025-03-04 15:40 ` [PATCH v2 9/9] io_uring: cap cached iovec/bvec size Pavel Begunkov
2025-03-06 12:01 ` [PATCH v2 0/9] Add support for vectored registered buffers Jens Axboe
2025-03-06 12:10   ` Jens Axboe
2025-03-06 22:59     ` Jens Axboe
2025-03-07 14:14       ` Pavel Begunkov

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] \
    [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