linux-stable/kernel/dma
David Rientjes 1d659236fb dma-pool: scale the default DMA coherent pool size with memory capacity
When AMD memory encryption is enabled, some devices may use more than
256KB/sec from the atomic pools.  It would be more appropriate to scale
the default size based on memory capacity unless the coherent_pool
option is used on the kernel command line.

This provides a slight optimization on initial expansion and is deemed
appropriate due to the increased reliance on the atomic pools.  Note that
the default size of 128KB per pool will normally be larger than the
single coherent pool implementation since there are now up to three
coherent pools (DMA, DMA32, and kernel).

Note that even prior to this patch, coherent_pool= for sizes larger than
1 << (PAGE_SHIFT + MAX_ORDER-1) can fail.  With new dynamic expansion
support, this would be trivially extensible to allow even larger initial
sizes.

Signed-off-by: David Rientjes <rientjes@google.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2020-04-25 13:17:06 +02:00
..
coherent.c dma-coherent: fix integer overflow in the reserved-memory dma allocation 2020-03-16 10:43:02 +01:00
contiguous.c dma-contiguous: CMA: give precedence to cmdline 2020-01-30 14:41:42 +01:00
debug.c dma-debug: make __dma_entry_alloc_check_leak() static 2020-04-20 12:05:18 +02:00
direct.c dma-direct: atomic allocations must come from atomic coherent pools 2020-04-25 13:17:05 +02:00
dummy.c dma-mapping: factor out dummy DMA ops 2018-12-13 21:06:12 +01:00
Kconfig dma-remap: separate DMA atomic pools from direct remap code 2020-04-20 12:08:45 +02:00
Makefile dma-remap: separate DMA atomic pools from direct remap code 2020-04-20 12:08:45 +02:00
mapping.c dma-mapping: Fix dma_pgprot() for unencrypted coherent pages 2020-03-17 11:52:58 +01:00
pool.c dma-pool: scale the default DMA coherent pool size with memory capacity 2020-04-25 13:17:06 +02:00
remap.c dma-remap: separate DMA atomic pools from direct remap code 2020-04-20 12:08:45 +02:00
swiotlb.c dma-direct: improve swiotlb error reporting 2020-02-05 18:53:05 +01:00
virt.c dma-mapping: zero memory returned from dma_alloc_* 2018-12-20 08:13:52 +01:00