On 1/2/25 6:01 PM, Ming Lei wrote:
But why does DMA segment size have to be >= PAGE_SIZE(4KB, 64KB)?
From the description of patch 5/8 of my patch series: "If the segment size is smaller than the page size there may be multiple segments per bvec even if a bvec only contains a single page." The current block layer implementation is based on the assumption that a single page fits in a single DMA segment. Please take a look at patch 5/8 of my patch series.
From the link, you have storage controllers with DMA segment size which is less than 4K, which may never get supported by linux kernel.
As mentioned in the cover letter of that patch series, I came up with that patch series to support a DMA controller with max_segment_size of 4 KiB on a system with a PAGE_SIZE of 16 KiB. Thanks, Bart.