[PATCHv2 00/11] dmapool enhancements

From: Keith Busch
Date: Fri Dec 16 2022 - 15:17:40 EST


From: Keith Busch <kbusch@xxxxxxxxxx>

The time spent in dma_pool alloc/free goes up linearly as the number of
pages backing the pool increases. We can reduce this to constant time
with some minor changes to how free pages are tracked.

Changes since previous version:

Fixed dmapool_test to use appropriate dma_op accessors

Fixed up comment in dmapool about the data structures

Fixed dma pool boundary checks when initializing the pool

And since I mess up the boundary checks for odd alignment, I updated
dmapool_test allow setting arbitrary alignment and boundary to catch
the same case that failed in the previous version, reported here:

https://lore.kernel.org/oe-lkp/202212112301.ad0819f7-oliver.sang@xxxxxxxxx/

Keith Busch (7):
dmapool: add alloc/free performance test
dmapool: move debug code to own functions
dmapool: rearrange page alloc failure handling
dmapool: consolidate page initialization
dmapool: simplify freeing
dmapool: don't memset on free twice
dmapool: link blocks across pages

Tony Battersby (4):
dmapool: remove checks for dev == NULL
dmapool: use sysfs_emit() instead of scnprintf()
dmapool: cleanup integer types
dmapool: speedup DMAPOOL_DEBUG with init_on_alloc

mm/Kconfig | 9 ++
mm/Makefile | 1 +
mm/dmapool.c | 356 ++++++++++++++++++++++------------------------
mm/dmapool_test.c | 146 +++++++++++++++++++
4 files changed, 324 insertions(+), 188 deletions(-)
create mode 100644 mm/dmapool_test.c

--
2.30.2