kernel_optimize_test/kernel/dma
Robin Murphy 2b9d9ac02b dma-debug: Dynamically expand the dma_debug_entry pool
Certain drivers such as large multi-queue network adapters can use pools
of mapped DMA buffers larger than the default dma_debug_entry pool of
65536 entries, with the result that merely probing such a device can
cause DMA debug to disable itself during boot unless explicitly given an
appropriate "dma_debug_entries=..." option.

Developers trying to debug some other driver on such a system may not be
immediately aware of this, and at worst it can hide bugs if they fail to
realise that dma-debug has already disabled itself unexpectedly by the
time their code of interest gets to run. Even once they do realise, it
can be a bit of a pain to emprirically determine a suitable number of
preallocated entries to configure, short of massively over-allocating.

There's really no need for such a static limit, though, since we can
quite easily expand the pool at runtime in those rare cases that the
preallocated entries are insufficient, which is arguably the least
surprising and most useful behaviour. To that end, refactor the
prealloc_memory() logic a little bit to generalise it for runtime
reallocations as well.

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Tested-by: Qian Cai <cai@lca.pw>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2018-12-11 14:31:17 +01:00
..
coherent.c
contiguous.c dma-mapping: fix panic caused by passing empty cma command line argument 2018-09-20 09:01:08 +02:00
debug.c dma-debug: Dynamically expand the dma_debug_entry pool 2018-12-11 14:31:17 +01:00
direct.c dma-direct: remove the mapping_error dma_map_ops method 2018-12-06 06:56:36 -08:00
Kconfig dma-mapping: move the arm64 noncoherent alloc/free support to common code 2018-12-01 18:07:11 +01:00
Makefile dma-mapping: move the remap helpers to a separate file 2018-12-01 17:58:34 +01:00
mapping.c dma-mapping: move the remap helpers to a separate file 2018-12-01 17:58:34 +01:00
remap.c dma-mapping: fix lack of DMA address assignment in generic remap allocator 2018-12-05 05:49:10 -08:00
swiotlb.c dma-direct: remove the mapping_error dma_map_ops method 2018-12-06 06:56:36 -08:00
virt.c