Switch kbuf mappings to vm_insert_pages()
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest6 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/6 | io_uring/kbuf: get rid of lower BGID listsinclude/ io_uring/ io_uring/ | +8 | 0 replies | |
| 2/6 | io_uring/kbuf: get rid of bl->is_readyio_uring/ io_uring/ | +0 | 0 replies | |
| 3/6 | io_uring/kbuf: vmap pinned buffer ringio_uring/ | +15 | 0 replies | |
| 4/6 | io_uring/kbuf: protect io_buffer_list teardown with a referenceio_uring/ io_uring/ | +13 | 0 replies | |
| 5/6 | mm: add nommu variant of vm_insert_pages()mm/ | +7 | 0 replies | |
| 6/6 | io_uring/kbuf: use vm_insert_pages() for mmap'ed pbuf ringinclude/ io_uring/ io_uring/ +2 more | +82 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCHSET 0/6] Switch kbuf mappings to vm_insert_pages()
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(-)
Signature · 1 line
Jens Axboe