]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
dma/pool: Avoid allocating redundant pools
authorRobin Murphy <robin.murphy@arm.com>
Mon, 12 Jan 2026 15:46:38 +0000 (15:46 +0000)
committerMarek Szyprowski <m.szyprowski@samsung.com>
Wed, 14 Jan 2026 10:00:00 +0000 (11:00 +0100)
commitc6ccd098807483762ccd726e1498bac5a71d0005
tree38064d3e4ec8596bbf438a53e12fdcd904482669
parent6626734dd2b151753e134730e27d17e64784c345
dma/pool: Avoid allocating redundant pools

On smaller systems, e.g. embedded arm64, it is common for all memory
to end up in ZONE_DMA32 or even ZONE_DMA. In such cases it is redundant
to allocate a nominal pool for an empty higher zone that just ends up
coming from a lower zone that should already have its own pool anyway.
We already have logic to skip allocating a ZONE_DMA pool when that is
empty, so generalise that to save memory in the case of other zones too.

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Tested-by: Vladimir Kondratiev <vladimir.kondratiev@mobileye.com>
Reviewed-by: Baoquan He <bhe@redhat.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Link: https://lore.kernel.org/r/8ab8d8a620dee0109f33f5cb63d6bfeed35aac37.1768230104.git.robin.murphy@arm.com
kernel/dma/pool.c