Skip to content

Introduce IORING_OP_MMAP

Gabriel Krisman Bertazi io-uring linux-mm oe-kbuild-all 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 8 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2io_uring: Support commands with optional file descriptorsio_uring/io_uring.c io_uring/opdef.h+12 -50 replies
2/2io_uring: introduce IORING_OP_MMAPinclude/uapi/linux/io_uring.h io_uring/Makefile io_uring/mmap.c +2 more+171 -13 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] Introduce IORING_OP_MMAP

Hi,

There's been a few requests over time for supporting mmap(2) over io_uring. The reasoning are twofold: 1) serving as base for batching multiple mappings in a single operation 2) supporting mmap of fixed files.

Since mmap can operate on either anonymous memory and file descriptors, patch 1 adds support for optional fds in io_uring commands. Patch 2 implements the mmap operation itself.

Note this patchset doesn't do any kind of smarter batching in MM. While we can potentially do some interesting optimizations already, like holding the MM write lock instead of reacquiring it for each mapping, I wanted to focus on the API discussion first. This is left as future work.

liburing support, including testcases, will be sent shortly to the list, but can also be found at:

https://github.com/krisman/liburing -b mmap

Thanks,

Cc Andrew Morton <[email protected]>
Cc David Hildenbrand <[email protected]>
Cc Lorenzo Stoakes <[email protected]>
Cc Vlastimil Babka <[email protected]>
Cc Liam R. Howlett <[email protected]>
Cc Mike Rapoport <[email protected]>
Cc Suren Baghdasaryan <[email protected]>
Cc Michal Hocko <[email protected]>

Gabriel Krisman Bertazi (2):
io_uring: Support commands with optional file descriptors
io_uring: introduce IORING_OP_MMAP

 include/uapi/linux/io_uring.h |  10 +++
 io_uring/Makefile             |   2 +-
 io_uring/io_uring.c           |  15 ++--
 io_uring/mmap.c               | 147 ++++++++++++++++++++++++++++++++++
 io_uring/mmap.h               |   4 +
 io_uring/opdef.c              |   9 +++
 io_uring/opdef.h              |   2 +
 7 files changed, 183 insertions(+), 6 deletions(-)
 create mode 100644 io_uring/mmap.c
 create mode 100644 io_uring/mmap.h
Signature · 1 line
2.52.0