[RFC PATCH 1/3] add full_buffer_write flag to struct device_dma_parameters

Andy Shevchenko andriy.shevchenko at linux.intel.com
Wed Feb 5 00:01:47 PST 2025


On Tue, Feb 04, 2025 at 11:36:28PM +0000, Jianxiong Gao wrote:
> When devices write to a buffer, some devices are guaranteed to
> overwrite the entire buffer. These devices may benefit from such
> behaviors by reducing the need to pre-condition the original
> buffer. For example when bouncing data through swiotlb, the buffer
> is forced to be synced before the device writes to it. For devices
> that we know for sure overwrites the entire buffer, this flag can
> be utilized to eliminate the extra copy on every IO bounced
> through the swiotlb.

...

> struct device_dma_parameters {

>  	 * a low level driver may set these to teach IOMMU code about
>  	 * sg limitations.
>  	 */
> +	bool full_buffer_write;
>  	unsigned int max_segment_size;
>  	unsigned int min_align_mask;
>  	unsigned long segment_boundary_mask;

Have you run `pahole`? Please, share the results.

-- 
With Best Regards,
Andy Shevchenko





More information about the Linux-nvme mailing list