public inbox for [email protected]
 help / color / mirror / Atom feed
From: Jens Axboe <[email protected]>
To: [email protected]
Subject: [PATCHSET 0/6] Switch kbuf mappings to vm_insert_pages()
Date: Thu, 21 Mar 2024 08:44:55 -0600	[thread overview]
Message-ID: <[email protected]> (raw)

Hi,

This series cleans up kbuf management a bit.

First two patches get rid of our array of buffer_lists, as in my testing
there's no discernable difference between the xarray lookup and our
array. This also then gets rid of any difference between lower and higher
buffer group IDs, which is nice.

Patch 3 starts using vmap for the non-mmap case for provided buffer
rings, which means we can clean up the buffer indexing in
io_ring_buffer_select() as well as there's now no difference between
how we handle mmap vs gup versionf of buffer lists.

Patches 4 and 5 are prep patches for patch 6, which switches the mmap
buffer_list variant away from remap_pfn_range() and uses
vm_insert_pages() instead.

This is how it should've been done initially, and as per the diffstat,
it's a nice reduction in code as well.

 include/linux/io_uring_types.h |   4 -
 io_uring/io_uring.c            |  32 ++---
 io_uring/io_uring.h            |   3 -
 io_uring/kbuf.c                | 298 ++++++++++++++---------------------------
 io_uring/kbuf.h                |   8 +-
 mm/nommu.c                     |   7 +
 6 files changed, 119 insertions(+), 233 deletions(-)

-- 
Jens Axboe


             reply	other threads:[~2024-03-21 14:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-21 14:44 Jens Axboe [this message]
2024-03-21 14:44 ` [PATCH 1/6] io_uring/kbuf: get rid of lower BGID lists Jens Axboe
2024-03-21 14:44 ` [PATCH 2/6] io_uring/kbuf: get rid of bl->is_ready Jens Axboe
2024-03-21 14:44 ` [PATCH 3/6] io_uring/kbuf: vmap pinned buffer ring Jens Axboe
2024-03-21 14:44 ` [PATCH 4/6] io_uring/kbuf: protect io_buffer_list teardown with a reference Jens Axboe
2024-03-21 14:45 ` [PATCH 5/6] mm: add nommu variant of vm_insert_pages() Jens Axboe
2024-03-21 14:45 ` [PATCH 6/6] io_uring/kbuf: use vm_insert_pages() for mmap'ed pbuf ring 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