Linux 7.4 Adds Direct DMA-BUF Memory Access Support To io_uring
Linux 7.4 enables high-performance data transfers by allowing io_uring to read and write directly to DMA-BUF memory, bypassing CPU copies for NVMe devices.
Linux 7.4 was merged on October 27 during the merge window, adding support for applications to read and write DMA-BUF memory directly through io_uring. This infrastructure moves data between storage and device memory without CPU copies.
Pavel Begunkov led the work through eleven rounds of patch review. The feature is opt-in for files, requiring a file to implement a new file operation before participating. The user-facing API builds on registered buffers in io_uring. A dmabuf gets registered in a special way, enabling use with IORING_OP_READ_FIXED and IORING_OP_WRITE_FIXED requests just like any other registered buffer.
Internally, the new file operation creates a mapping that travels down the I/O stack in a new iterator type. Additional infrastructure ties the components together, counts requests, manages buffer lifetime, and handles invalidation.
Current support is limited to raw NVMe PCIe block devices, where DMA-BUF buffers for block devices can reach up to 4GB in size. Other file types must implement the new file operation before they can use the feature.
