diff options
author | David Rientjes <rientjes@google.com> | 2020-04-20 12:09:58 +0200 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2020-04-25 13:17:02 +0200 |
commit | 54adadf9b08571fb8b11dc9d0d3a2ddd39825efd (patch) | |
tree | 0aef45e03984a968dba71522c6c9528ba4ae58f9 /kernel/dma/direct.c | |
parent | c84dc6e68a1d2464e050d9694be4e4ff49e32bfd (diff) | |
download | linux-54adadf9b08571fb8b11dc9d0d3a2ddd39825efd.tar.bz2 |
dma-pool: dynamically expanding atomic pools
When an atomic pool becomes fully depleted because it is now relied upon
for all non-blocking allocations through the DMA API, allow background
expansion of each pool by a kworker.
When an atomic pool has less than the default size of memory left, kick
off a kworker to dynamically expand the pool in the background. The pool
is doubled in size, up to MAX_ORDER-1. If memory cannot be allocated at
the requested order, smaller allocation(s) are attempted.
This allows the default size to be kept quite low when one or more of the
atomic pools is not used.
Allocations for lowmem should also use GFP_KERNEL for the benefits of
reclaim, so use GFP_KERNEL | GFP_DMA and GFP_KERNEL | GFP_DMA32 for
lowmem allocations.
This also allows __dma_atomic_pool_init() to return a pointer to the pool
to make initialization cleaner.
Also switch over some node ids to the more appropriate NUMA_NO_NODE.
Signed-off-by: David Rientjes <rientjes@google.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'kernel/dma/direct.c')
0 files changed, 0 insertions, 0 deletions