From: Gabriel Krisman Bertazi <krisman@suse.de>
To: axboe@kernel.dk
Cc: io-uring@vger.kernel.org,
Gabriel Krisman Bertazi <krisman@suse.de>,
Andrew Morton <akpm@linux-foundation.org>,
David Hildenbrand <david@kernel.org>,
Lorenzo Stoakes <lorenzo.stoakes@oracle.com>,
Vlastimil Babka <vbabka@suse.cz>,
"Liam R. Howlett" <Liam.Howlett@oracle.com>,
Mike Rapoport <rppt@kernel.org>,
Suren Baghdasaryan <surenb@google.com>,
Michal Hocko <mhocko@suse.com>,
linux-mm@kvack.org
Subject: [PATCH 0/2] Introduce IORING_OP_MMAP
Date: Thu, 29 Jan 2026 17:11:36 -0500 [thread overview]
Message-ID: <20260129221138.897715-1-krisman@suse.de> (raw)
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 <akpm@linux-foundation.org>
Cc: David Hildenbrand <david@kernel.org>
Cc: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Liam R. Howlett <Liam.Howlett@oracle.com>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: linux-mm@kvack.org
Cc: io-uring@vger.kernel.org
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
--
2.52.0
next reply other threads:[~2026-01-29 22:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-29 22:11 Gabriel Krisman Bertazi [this message]
2026-01-29 22:11 ` [PATCH 1/2] io_uring: Support commands with optional file descriptors Gabriel Krisman Bertazi
2026-01-29 22:11 ` [PATCH 2/2] io_uring: introduce IORING_OP_MMAP Gabriel Krisman Bertazi
2026-01-30 6:03 ` kernel test robot
2026-01-30 15:47 ` Gabriel Krisman Bertazi
2026-01-30 15:55 ` 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 \
--in-reply-to=20260129221138.897715-1-krisman@suse.de \
--to=krisman@suse.de \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=axboe@kernel.dk \
--cc=david@kernel.org \
--cc=io-uring@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lorenzo.stoakes@oracle.com \
--cc=mhocko@suse.com \
--cc=rppt@kernel.org \
--cc=surenb@google.com \
--cc=vbabka@suse.cz \
/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