public inbox for io-uring@vger.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: io-uring <io-uring@vger.kernel.org>,
	"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>
Subject: [GIT PULL] io_uring dma-buf support for 7.4
Date: Sun, 25 Oct 2026 07:30:07 -0600	[thread overview]
Message-ID: <b97140d2-df87-4cdf-9f0b-d5ca404d50da@kernel.dk> (raw)

Hi Linus,

This adds native dma-buf support to the I/O path, exposed through
io_uring. It's been in development for a while and should be ready
to go now. Since it depends on both the io_uring and block trees,
I've deferred sending it out until those were merged. This pull
request contains:

- dma-buf file I/O infrastructure: a dma_buf_io_ctx created through a
  new ->init_dma_buf_io_ctx file operation, and a dma_buf_io_map holding
  the device DMA mapping. The two are split so a mapping can be
  invalidated and re-established underneath a live context, with the map
  counting in-flight requests so it can be torn down safely.

- A new iov_iter type for dmabuf maps, and a dma map backed bio type for
  the block layer, with raw block device support on top.

- nvme-pci backend implementing dma-buf backed requests, including SGL
  support.

- io_uring dmabuf backed registered buffers, built on a reworked buffer
  registration structure with an extended update path, regbuf import
  flags, an uncloneable flag for buffer types that can't be cloned, and
  cloning support for registered dma-bufs.

Note that this conflicts with block/fops.c in your tree, as the dma-buf
rejection in the buffered write fallback landed next to the NOWAIT and
i_rwsem changes from the block pull. Fixup is trivial, it's just adding
the iov_iter_is_dmabuf_map() check in the changed
blkdev_buffered_write().

Please pull!


The following changes since commit e889b0e4cafddb3d68c3595dc01b7128fd35fbef:

  io_uring/io-wq: don't call try_to_wake_up() twice in io_wq_worker_wake() (2026-10-12 10:19:52 -0600)

are available in the Git repository at:

  https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux.git tags/for-7.4/io_uring-dmabuf-20261023

for you to fetch changes up to 45b716456dd99488a0cef58482120dc0474aa696:

  io_uring/dma-buf: don't fail fixed buffers without dma-buf support (2026-10-22 09:27:00 -0600)

----------------------------------------------------------------
for-7.4/io_uring-dmabuf-20261023

----------------------------------------------------------------
Anuj Gupta (3):
      nvme-pci: rename nvme_pci_sgl_set_data to nvme_pci_dma_iter_set_sgl
      nvme-pci: add SGL support for the dmabuf path
      io_uring/dma-buf: don't fail fixed buffers without dma-buf support

Keith Busch (2):
      block: reject dma-bufs larger than 4GiB
      nvme-pci: detach dma-bufs only on removal

Pavel Begunkov (15):
      dma-buf: introduce initial file I/O infrastructure
      iov_iter: add iterator type for dmabuf maps
      block: always adjust bi_offset on bio_advance_iter
      block: introduce dma map backed bio type
      block: add dma-buf support for raw bdev
      nvme-pci: implement dma-buf backed requests
      io_uring/rsrc: introduce buf registration structure
      io_uring/rsrc: extend buffer update
      io_uring/rsrc: add uncloneable regbuf flag
      io_uring/rsrc: add regbuf import flags
      io_uring/rsrc: add dmabuf backed registered buffers
      block: fix indention for dma-buf checks
      dma-buf-io: fix typos in kernel docs
      dma-buf-io: document dma_buf_io_init_map
      io_uring/dma-buf: allow cloning registered dma-bufs

 block/bio.c                    |  15 +-
 block/blk-merge.c              |  52 +++++++
 block/blk-mq.c                 |   6 +
 block/fops.c                   |  29 +++-
 drivers/dma-buf/Makefile       |   2 +-
 drivers/dma-buf/dma-buf-io.c   | 241 ++++++++++++++++++++++++++++++++
 drivers/md/dm-io-rewind.c      |   6 +-
 drivers/nvme/host/Makefile     |   1 +
 drivers/nvme/host/core.c       |  12 ++
 drivers/nvme/host/nvme.h       |   2 +
 drivers/nvme/host/pci-dmabuf.c | 169 ++++++++++++++++++++++
 drivers/nvme/host/pci-dmabuf.h |  75 ++++++++++
 drivers/nvme/host/pci.c        | 247 ++++++++++++++++++++++++++++++++-
 include/linux/bio.h            |  21 +--
 include/linux/blk-mq.h         |   7 +
 include/linux/blk_types.h      |  14 +-
 include/linux/blkdev.h         |   2 +
 include/linux/bvec.h           |   3 +-
 include/linux/dma-buf-io.h     | 126 +++++++++++++++++
 include/linux/fs.h             |   2 +
 include/linux/io_uring_types.h |   5 +
 include/linux/iov_iter.h       |   2 +
 include/linux/uio.h            |  11 ++
 include/uapi/linux/io_uring.h  |  31 ++++-
 io_uring/Makefile              |   1 +
 io_uring/dma-buf.c             |  71 ++++++++++
 io_uring/dma-buf.h             |  76 ++++++++++
 io_uring/rsrc.c                | 178 ++++++++++++++++++------
 io_uring/rsrc.h                |  31 ++++-
 io_uring/rw.c                  |  33 +++--
 lib/iov_iter.c                 |  29 +++-
 31 files changed, 1414 insertions(+), 86 deletions(-)
 create mode 100644 drivers/dma-buf/dma-buf-io.c
 create mode 100644 drivers/nvme/host/pci-dmabuf.c
 create mode 100644 drivers/nvme/host/pci-dmabuf.h
 create mode 100644 include/linux/dma-buf-io.h
 create mode 100644 io_uring/dma-buf.c
 create mode 100644 io_uring/dma-buf.h

-- 
Jens Axboe


             reply	other threads:[~2026-10-25 13:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-25 13:30 Jens Axboe [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-10-25 13:29 [GIT PULL] io_uring dma-buf support for 7.4 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=b97140d2-df87-4cdf-9f0b-d5ca404d50da@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=io-uring@vger.kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    /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