Linux 7.4 Connects DMA-BUF Memory to Raw NVMe I/O

Linux 7.4 lets io_uring move DMA-BUF data through raw NVMe without a conventional CPU staging copy, but the first implementation is intentionally narrow.

QuantumBytz Team
December 5, 2026
Share:
Samsung 990 Pro M.2 NVMe solid-state drive photographed in its white packaging tray.

Summary

Linux 7.4 is adding a storage path for a kind of memory that ordinary read and write calls have handled awkwardly: DMA-BUF objects shared by hardware devices. An application can register a DMA-BUF with io_uring for a specific raw NVMe block device, then use fixed-buffer reads and writes without first copying the data through a conventional CPU-owned userspace buffer.[1][2]

The immediate use case is moving data between GPU-accessible memory and local NVMe. That could help checkpointing, model loading, media pipelines and cache systems in which the CPU is mostly supervising data movement between two PCIe devices. It also avoids repeatedly constructing IOMMU mappings. In tests cited by the patch author, a strict-IOMMU configuration rose from 570,000 to 5.01 million I/O operations per second after the mapping optimization.[1]

That number is useful evidence for the design, not a promise for applications. The merged code supports raw NVMe PCIe block devices, not normal files on ext4 or XFS. Software needs a suitable DMA-BUF exporter and new registration code. The measurements came from a focused udmabuf test, and Linux 7.4 is still at the release-candidate stage.[3][4]

The copy that Linux can now avoid

DMA-BUF is Linux's established mechanism for letting devices and subsystems share memory. A graphics driver can export a buffer as a file descriptor; another driver can attach to it, map its scatter-gather table for DMA and access the same allocation. The framework is common in graphics and video because a camera, GPU and display controller may all need the same frames without the CPU copying each frame between private buffers.[5]

Storage I/O did not fit that model cleanly. A conventional read() or write() points at a userspace virtual address. io_uring can register those buffers ahead of time, reducing per-operation setup and page-pinning work, but the registered object is still normally described as CPU-addressable memory. A DMA-BUF may instead represent device memory, or an allocation whose location and mapping are managed by its exporter.

The Linux 7.4 work gives the I/O stack a native description of that object. Userspace registers a DMA-BUF file descriptor together with the target file descriptor. Once registered, the buffer can be submitted through IORING_OP_READ_FIXED or IORING_OP_WRITE_FIXED, much like an ordinary fixed io_uring buffer.[1]

This does not mean bytes literally bypass every part of the kernel. io_uring still submits the request, the block layer still builds and splits block I/O, and the NVMe driver still programs the device. The removed work is the detour through a separate CPU buffer and, just as important for small I/O, repeated DMA mapping setup.

How the new path is put together

The merged series adds two core objects. A dma_buf_io_ctx associates a DMA-BUF with a particular file and importer driver. A dma_buf_io_map holds the active device mapping and counts the requests using it.[2] Keeping the context separate from the map lets the kernel invalidate and rebuild a mapping while retaining the registration visible to io_uring.

That distinction matters because DMA-BUF memory is not necessarily nailed forever to one physical arrangement. An exporter may need to migrate or reallocate its backing storage. Linux's DMA-BUF documentation describes the exporter as the component responsible for the allocation and any scatter-list migration, while importers attach and map the buffer for their own devices.[5]

When a map must go away, the new code prevents fresh users from acquiring it, waits for in-flight references to drain, and asks the device-specific implementation to unmap it. A later I/O can create a replacement map. The NVMe path also handles device removal and rejects registration against a dead controller.[1][2]

The plumbing reaches through several layers. Linux 7.4 adds a DMA-BUF-backed iterator, a block bio type that carries the DMA mapping, raw block-device support, and an NVMe PCI backend with scatter-gather-list handling. io_uring gains a DMA-BUF registered-buffer type and import flags. The final merge changed 31 files and added roughly 1,400 lines.[2]

This is deliberately opt-in. A file implementation must expose the new initialization operation before io_uring can register a DMA-BUF against it. In the first merged version, the only implementation is the raw NVMe block path. The limit for one block-device DMA-BUF is 4 GiB.[2][3]

Why the IOMMU result is so large

The patch discussion reports three before-and-after results for udmabuf reads. With strict IOMMU handling, throughput increased from 570 KIOPS to 5.01 MIOPS. Lazy mode moved from 1.93 MIOPS to 5.01 MIOPS. Passthrough mode was already at 5.01 MIOPS and did not change.[1]

That pattern says more about mapping overhead than raw NAND speed. In strict mode, IOMMU mappings and invalidations are handled promptly, which can make frequent map-and-unmap cycles expensive. Lazy mode amortizes some of that work. Passthrough avoids the translation cost, so preserving a long-lived mapping has little left to improve.

The new registration path builds and retains the device mapping, allowing many requests to reuse it. Reaching the same 5.01 MIOPS in all three modes suggests the test removed an IOMMU setup bottleneck rather than making the NVMe media itself faster. It is a strong result for workloads that were paying that cost on every operation.

It is also easy to misuse the figure. The cover letter does not provide a complete application benchmark, CPU utilization, transfer size distribution, drive model or end-to-end job time. Udmabuf is a kernel facility for creating DMA-BUF objects from userspace memory; it is useful for exercising the interface but is not identical to a large GPU training job. The patch set was tested with GPU-to-NVMe transfers, yet no public result shows that every GPU, IOMMU and NVMe topology receives a ninefold application gain.[1]

What software can use it first

The narrowest useful application is a service that already owns DMA-BUF memory and needs raw block I/O. A GPU cache could spill blocks to a dedicated NVMe namespace. A media system could record device-produced frames without staging each one in another userspace allocation. A checkpointing system could write accelerator state through a prearranged block layout.

The LMCache project has already opened an RFC to evaluate the interface for an NVMe-backed cache. Its interest makes sense: an inference cache moves large tensors between accelerator memory and storage, and extra host copies consume memory bandwidth while tying up CPU cores.[6] An RFC is not production support, though. It shows that downstream developers are examining the API, not that a drop-in integration exists.

Raw block access is the largest practical constraint. Most applications want files, quotas, crash recovery, snapshots and space allocation, not sector management. A service using the first implementation must reserve a device or namespace and build its own placement, metadata and recovery rules. That can be acceptable for an appliance-like cache, but it is a much higher operational bar than opening a file.

The generic infrastructure is not tied to NVMe or io_uring, according to the patch author.[1] Other file types and upper-layer APIs could adopt it later. Filesystems are harder because a file offset must pass through extent mapping, allocation, copy-on-write and sometimes encryption or checksumming before it becomes a block request. The current merge should be read as a foundation with one working backend, not universal device-to-storage I/O.

What it does not replace

This feature is adjacent to technologies often grouped under "GPU direct storage," but the labels can hide important differences. Linux now has an upstream mechanism for carrying DMA-BUF mappings through io_uring, the block layer and the NVMe PCI driver. It does not supply a complete vendor-neutral library that discovers GPU allocations, arranges files, synchronizes kernels and storage, and tunes transfers for an application.

It also does not remove synchronization requirements. A producer must finish writing a shared buffer before NVMe reads from it, and a consumer must not use data before the storage operation completes. DMA-BUF includes reservation and fence machinery, but the merged I/O design removed implicit fence handling from earlier revisions and waits synchronously when mappings are invalidated.[1][5] Applications still need a clear ownership and completion protocol.

Topology remains decisive. Direct peer traffic may be restricted or rerouted by PCIe switches, IOMMU groups, firmware settings and platform security policy. Some systems may move data through host memory even when the API avoids an explicit userspace copy. Operators need measurements from the actual server, not an assumption based on the word "direct."

Security boundaries do not disappear either. Raw block access is privileged for good reason. A bug in an offset calculation can corrupt unrelated data, and a leaked DMA-BUF descriptor can expose memory to another process or device. Kernel documentation specifically warns that DMA-BUF file descriptors should be created with close-on-exec atomically to avoid descriptor leaks.[5]

A sensible evaluation plan

Start by confirming the kernel and hardware path. Linux 7.4 must be built with DMA-BUF and io_uring support, the target must be a raw NVMe PCI block device, and the application needs an exporter that can produce a compatible DMA-BUF. The liburing test branch linked by the patch series is a better first probe than modifying a production service.[1]

Measure four paths separately: an ordinary buffered file, direct I/O into registered host memory, raw-block io_uring into registered host memory, and the new DMA-BUF path. Keep the device, queue depth, block sizes and data volume fixed. Report IOPS and throughput, but also CPU time, IOMMU faults, PCIe traffic and application completion time.

Run with the platform's real IOMMU policy. The upstream numbers predict the largest benefit under strict translation, so a passthrough test alone can miss the main reason for the feature. Repeat the test after NVMe reset and under cancellation, process exit and mapping invalidation. Fast steady-state I/O is not enough if a failed accelerator or drive leaves memory pinned or shutdown hung.

Finally, test data integrity. Use known patterns across alignment boundaries and the 4 GiB limit, verify reads after writes, and exercise concurrent users of the same buffer. The patch series went through eleven public revisions and includes liburing tests, which is reassuring. It does not remove the need to validate a new raw-device data path under the failure modes of the application that will own it.

Linux 7.4's DMA-BUF I/O support is small in scope and useful precisely because it does not pretend otherwise. It gives accelerator-oriented software an upstream route from shared device memory to NVMe and removes a measurable IOMMU cost. The next question is whether filesystems and production libraries can build on that route without giving back the saved work in metadata, synchronization and operational complexity.

Sources

  1. PATCH v11 00/13: Add dmabuf read/write via io_uring, Pavel Begunkov, October 14, 2026.
  2. Linux merge commit: io_uring DMA-BUF support for 7.4, Linux kernel source, October 27, 2026.
  3. Linux 7.4 introduces DMA-BUF support to the I/O path with io_uring, Phoronix, October 27, 2026.
  4. Linux 7.4 changelog, KernelNewbies, updated December 1, 2026.
  5. Buffer sharing and synchronization (DMA-BUF), Linux kernel documentation, 7.4-rc5.
  6. RFC: Evaluating io_uring DMA-BUF support for NVMe in LMCache, LMCache project, October 16, 2026.

QuantumBytz Team

The QuantumBytz Editorial Team covers cutting-edge computing infrastructure, including quantum computing, AI systems, Linux performance, HPC, and enterprise tooling. Our mission is to provide accurate, in-depth technical content for infrastructure professionals.

Learn more about our editorial team