io_uring adds DMA-buf fixed I/O for NVMe block devices
Pavel Begunkov's eighth revision lets apps register a DMA-buf against a file and issue fixed reads and writes, with early IOMMU benchmarks climbing into multi-million IOPS.
A new Linux kernel series from Pavel Begunkov adds optional support for registering a DMA-buf with an io_uring instance and using it for fixed read and write operations against a chosen file. Only NVMe block devices implement the feature in this round, though the underlying plumbing is not tied to io_uring and is designed so other subsystems can adopt it later.
The work matters for zero-copy pipelines that already move data through DMA-buf, the kernel's shared-buffer mechanism widely used by GPUs and other devices. Until now, feeding those buffers into storage I/O typically meant extra copies or awkward staging. With the new path, a registered DMA-buf becomes usable like any other io_uring registered buffer via the existing fixed read and write opcodes, issued against the file named at registration time.
Files must opt in by implementing a new operation. On the block side the series teaches the I/O stack how to carry a pre-mapped DMA-buf through bios and requests, including splitting rules that treat the buffer as a single range rather than a conventional page list. The NVMe PCI driver then builds PRP or SGL descriptors directly from that mapping and tracks attached contexts so mappings can be invalidated safely.
Earlier experimentation on IOMMU configurations, credited to Anuj Gupta and others who tested prior revisions, reported large gains for the strict and lazy cases, both reaching about 5.01 million IOPS where the baseline had been far lower, while passthrough was already saturated. Users must be prepared for spurious EAGAIN and reissue; cloning of these buffer registrations is deliberately disallowed for now.
The series revives ideas first explored years ago by Keith Busch and later pursued by Tushar Gohad and Vishal Verma. liburing tests accompany the uapi changes, which extend buffer registration with an explicit descriptor type for DMA-buf file descriptors.