OSDN Git Service

dma-contiguous: support numa CMA for specified node
authorYajun Deng <yajun.deng@linux.dev>
Wed, 12 Jul 2023 07:47:58 +0000 (15:47 +0800)
committerChristoph Hellwig <hch@lst.de>
Mon, 31 Jul 2023 15:54:29 +0000 (17:54 +0200)
commitbf29bfaa54901a4bdee2a18cd10eb951a884a5f9
tree830ab38ee71ea12958a18cbaa6c145c729a6ab2f
parent22e4a348f87c59df2c02f1efb7ba9a56b622c7b8
dma-contiguous: support numa CMA for specified node

The kernel parameter 'cma_pernuma=' only supports reserving the same
size of CMA area for each node. We need to reserve different sizes of
CMA area for specified nodes if these devices belong to different nodes.

Adding another kernel parameter 'numa_cma=' to reserve CMA area for
the specified node. If we want to use one of these parameters, we need to
enable DMA_NUMA_CMA.

At the same time, print the node id in cma_declare_contiguous_nid() if
CONFIG_NUMA is enabled.

Signed-off-by: Yajun Deng <yajun.deng@linux.dev>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Documentation/admin-guide/kernel-parameters.txt
kernel/dma/Kconfig
kernel/dma/contiguous.c
mm/cma.c