Linux 7.4 adds infrastructure for reading and writing DMA-BUF memory through io_uring, bringing hardware-buffer sharing into the kernel’s asynchronous I/O path. DMA-BUF lets device drivers and subsystems share memory without copying data through the CPU, a capability already used heavily by GPUs and increasingly in media and networking. Combining it with io_uring could extend zero-copy transfers to storage workflows and reduce data movement overhead.
The feature is opt-in: a file must implement a new operation to support it, and the initial implementation works only with raw NVMe PCIe block devices. Applications register a DMA-BUF through a special mechanism built on io_uring’s registered buffers, then use it with the existing fixed-buffer read and write requests. Kernel changes add an iterator for carrying these buffers through the I/O stack and handle request accounting, buffer lifetime, and invalidation. Block-device DMA-BUFs can be as large as 4 GB. Benchmarks included with the patch series show promising performance, though the report gives no numerical results; broader device support will depend on further implementation.
Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.