Re: [PATCH v4 1/5] dma-mapping: Add dma_opt_mapping_size()

2022-06-29 Thread John Garry via iommu
On 28/06/2022 12:27, John Garry via iommu wrote: On 28/06/2022 12:23, Robin Murphy wrote: + +    size_t +    dma_opt_mapping_size(struct device *dev); + +Returns the maximum optimal size of a mapping for the device. Mapping large +buffers may take longer so device drivers are advised to limit t

Re: [PATCH v4 1/5] dma-mapping: Add dma_opt_mapping_size()

2022-06-28 Thread John Garry via iommu
On 28/06/2022 12:23, Robin Murphy wrote: + +    size_t +    dma_opt_mapping_size(struct device *dev); + +Returns the maximum optimal size of a mapping for the device. Mapping large +buffers may take longer so device drivers are advised to limit total DMA +streaming mappings length to the return

Re: [PATCH v4 1/5] dma-mapping: Add dma_opt_mapping_size()

2022-06-28 Thread Robin Murphy
On 2022-06-27 16:25, John Garry wrote: Streaming DMA mapping involving an IOMMU may be much slower for larger total mapping size. This is because every IOMMU DMA mapping requires an IOVA to be allocated and freed. IOVA sizes above a certain limit are not cached, which can have a big impact on DMA

[PATCH v4 1/5] dma-mapping: Add dma_opt_mapping_size()

2022-06-27 Thread John Garry via iommu
Streaming DMA mapping involving an IOMMU may be much slower for larger total mapping size. This is because every IOMMU DMA mapping requires an IOVA to be allocated and freed. IOVA sizes above a certain limit are not cached, which can have a big impact on DMA mapping performance. Provide an API for