Linux Kernel & OS

Linux 7.4 adds DMA-BUF zero-copy I/O via IO_uring for NVMe block devices

Key Takeaway

Linux 7.4 enables DMA-BUF buffer sharing through IO_uring, allowing zero-copy read/write operations on NVMe block devices with buffers up to 4GB.

Summary

The Linux 7.4 merge window has accepted infrastructure that connects the kernel's DMA-BUF framework to the IO_uring asynchronous I/O subsystem. This integration, led by Pavel Begunkov through eleven rounds of review, permits DMA-BUF objects to be used as registered buffers for fixed READ and WRITE operations without CPU-mediated copies. The implementation is currently limited to raw NVMe PCIe block devices and requires drivers to opt in via a new file operation.

DMA-BUF is widely used by GPU drivers and increasingly in media and network stacks for sharing hardware memory buffers across subsystems. By routing these buffers through IO_uring, the kernel gains a unified fast path for device-to-device transfers that avoids traditional memory copy overhead. The user-facing API builds on IO_uring's existing registered buffer mechanism, with DMA-BUF objects registered specially then usable with standard IORING_OP_READ_FIXED and IORING_OP_WRITE_FIXED request types.

DMA-BUF IO_uring implementation details

  • Opt-in file operation: Block device drivers must implement a new file operation to expose DMA-BUF support; only NVMe devices are wired up in this initial series.
  • Registered buffer integration: DMA-BUF objects are registered through a special path within IO_uring's existing registered buffer framework, then usable with IORING_OP_READ_FIXED and IORING_OP_WRITE_FIXED requests.
  • New iterator type: The resulting DMA-BUF map traverses the I/O stack using a newly introduced iterator type, with additional infrastructure for request counting, lifetime management, and invalidation handling.
  • Buffer size limit: DMA-BUF buffers for block devices can reach up to 4GB in size, enabling large contiguous zero-copy transfers.
  • Performance gains: Benchmark numbers included in the patch series cover letter show substantial improvements, though specific figures were not detailed in the source text.

Why it matters

This development matters for Linux distributions and storage-intensive workloads because it eliminates CPU copy overhead between NVMe storage and devices that consume or produce DMA-BUF-backed memory, such as GPUs and media accelerators. For data centers, AI training pipelines, and video processing on Linux, the unified IO_uring path reduces latency and frees CPU cycles previously spent on memory copies. Gaming and Proton users on Steam Deck and desktop Linux may eventually see benefits as GPU drivers and compositors adopt similar zero-copy patterns for asset streaming and texture upload paths.

Original reference: www.phoronix.com →