[PATCH 0/2] dmapool performance enhancements

From: kbusch
Date: Thu Apr 28 2022 - 16:27:21 EST


From: Keith Busch <kbusch@xxxxxxxxxx>

Allocating and freeing blocks from the dmapool iterates a list of all
allocated pages. We can save time removing the per-alloc/free list
traversal for a constant time lookup, so this series does that.

Compared to current kernel, perf record from running io_uring benchmarks
on nvme reports dma_pool_alloc() cost reduction cut in half from 0.81% to
0.41%.

Keith Busch (2):
mm/dmapool: replace linked list with xarray
mm/dmapool: link blocks across pages

mm/dmapool.c | 107 +++++++++++++++++++++++++++------------------------
1 file changed, 56 insertions(+), 51 deletions(-)

--
2.30.2