Smart device manufacturer HONOR has posted a patch series adding direct I/O support to DMA-BUF with the “DMA_BUF_IOCTL_RW_FILE” flag. In turn this direct I/O use can yield significant throughput improvements and lower latency to help with AI model loading, real-time data streaming, and other uses.
The newest patch series was posted today for DMA_BUF_IOCTL_RW_FILE to enable direct I/O with DMA-BUF. The aim is to allow direct I/O support to avoid the heavy time spent within the page cache and memory copy code-paths and higher latency and power use observed in buffered I/O mode when dealing with UFS storage.
With the tests by HONOR, throughput on UFS4.0 storage capable of 4GB/s while using DMA-BUF was boosted from 1032MB/s to 3776MB/s with these patches! There was also no longer any page-cache overhead and eliminating memory copies via the direct path to lower RAM use. The code is also showing lower latency than using UDMABUF.
HONOR is working on this support for AI model loading, real-time data streaming, task snapshot storage, and other uses. Those interested in this work can learn more via this patch series.