mbox series

[PATCHSET,0/4] Cleanup io_buffer_list and mmap handling

Message ID 20240403135602.1623312-1-axboe@kernel.dk (mailing list archive)
Headers show
Series Cleanup io_buffer_list and mmap handling | expand

Message

Jens Axboe April 3, 2024, 1:52 p.m. UTC
Hi,

This series was previously part of the ring map series targeted for
6.10, where remap_pfn_range() was replaced by vm_insert_pages(). But I
think it can stand on its own and has real fixes in it too and should go
in sooner, so sending it out separately.

Series basically gets rid of the split we have between how lists are
stored depending on their buffer group ID, and stores everything in an
xarray to remove the distinction between the two. With that, we can drop
the io_buffer_list->is_ready as well. Then it adds a separate reference
for the io_buffer_list, and uses that to tighten down how mmap buffer
rings are handled.

The resulting code is simpler and easier to follow, and drops more code
than it adds.

 include/linux/io_uring_types.h |   1 -
 io_uring/io_uring.c            |  13 ++--
 io_uring/kbuf.c                | 118 ++++++++++++---------------------
 io_uring/kbuf.h                |   8 ++-
 4 files changed, 52 insertions(+), 88 deletions(-)