Home
last modified time | relevance | path

Searched hist:"54 adadf9b08571fb8b11dc9d0d3a2ddd39825efd" (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/kernel/dma/
H A Dpool.cdiff 54adadf9b08571fb8b11dc9d0d3a2ddd39825efd Mon Apr 20 05:09:58 CDT 2020 David Rientjes <rientjes@google.com> 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>