linux-stable/kernel/dma
John Garry a229cc14f3 dma-mapping: add dma_opt_mapping_size()
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 device drivers to know this "optimal" limit, such that
they may try to produce mapping which don't exceed it.

Signed-off-by: John Garry <john.garry@huawei.com>
Reviewed-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Acked-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2022-07-19 06:05:41 +02:00
..
coherent.c dma-mapping: use 'bitmap_zalloc()' when applicable 2021-10-27 08:20:09 +02:00
contiguous.c cma: factor out minimum alignment requirement 2022-03-22 15:57:05 -07:00
debug.c dma-debug: make things less spammy under memory pressure 2022-06-02 07:17:59 +02:00
debug.h dma-debug: teach add_dma_entry() about DMA_ATTR_SKIP_CPU_SYNC 2021-10-18 12:46:45 +02:00
direct.c dma-direct: don't over-decrypt memory 2022-05-23 15:25:40 +02:00
direct.h dma-direct: use is_swiotlb_active in dma_direct_map_page 2022-04-18 07:21:08 +02:00
dummy.c dma-mapping: return error code from dma_dummy_map_sg() 2021-08-09 17:13:06 +02:00
Kconfig dma-mapping: remove CONFIG_DMA_REMAP 2022-03-03 14:00:57 +03:00
Makefile dma-mapping: remove CONFIG_DMA_REMAP 2022-03-03 14:00:57 +03:00
map_benchmark.c dma-mapping: benchmark: extract a common header file for map_benchmark definition 2022-03-10 07:41:14 +01:00
mapping.c dma-mapping: add dma_opt_mapping_size() 2022-07-19 06:05:41 +02:00
ops_helpers.c dma-mapping: handle vmalloc addresses in dma_common_{mmap,get_sgtable} 2021-07-16 11:30:26 +02:00
pool.c dma/pool: create dma atomic pool only if dma zone has managed pages 2022-01-15 16:30:29 +02:00
remap.c kernel/dma: remove unnecessary unmap_kernel_range 2021-04-30 11:20:40 -07:00
swiotlb.c swiotlb: move struct io_tlb_slot to swiotlb.c 2022-07-18 06:50:18 +02:00