RE: [PATCH v4 1/2] dma-direct: provide the ability to reserve per-numa CMA

2020-07-29 Thread Song Bao Hua (Barry Song)
om; > catalin.mari...@arm.com; iommu@lists.linux-foundation.org; Linuxarm > ; linux-arm-ker...@lists.infradead.org; > linux-ker...@vger.kernel.org; Zengtao (B) ; > huangdaode ; Jonathan Cameron > ; Nicolas Saenz Julienne > ; Steve Capper ; Andrew > Morton ; Mike Rapoport > Subje

Re: [PATCH v4 1/2] dma-direct: provide the ability to reserve per-numa CMA

2020-07-28 Thread Christoph Hellwig
On Tue, Jul 28, 2020 at 12:19:03PM +, Song Bao Hua (Barry Song) wrote: > I am sorry I haven't got your point yet. Do you mean something like the below? > > arch/arm64/Kconfig: > config CMDLINE > string "Default kernel command string" > - default "" > + default "pernuma_cma=16M" >

RE: [PATCH v4 1/2] dma-direct: provide the ability to reserve per-numa CMA

2020-07-28 Thread Song Bao Hua (Barry Song)
talin.mari...@arm.com; iommu@lists.linux-foundation.org; Linuxarm > ; linux-arm-ker...@lists.infradead.org; > linux-ker...@vger.kernel.org; Zengtao (B) ; > huangdaode ; Jonathan Cameron > ; Nicolas Saenz Julienne > ; Steve Capper ; Andrew > Morton ; Mike Rapoport > Subject:

Re: [PATCH v4 1/2] dma-direct: provide the ability to reserve per-numa CMA

2020-07-28 Thread Christoph Hellwig
On Fri, Jul 24, 2020 at 01:13:43AM +1200, Barry Song wrote: > +config CMA_PERNUMA_SIZE_MBYTES > + int "Size in Mega Bytes for per-numa CMA areas" > + depends on NUMA > + default 16 if ARM64 > + default 0 > + help > + Defines the size (in MiB) of the per-numa memory area fo

[PATCH v4 1/2] dma-direct: provide the ability to reserve per-numa CMA

2020-07-23 Thread Barry Song
Right now, drivers like ARM SMMU are using dma_alloc_coherent() to get coherent DMA buffers to save their command queues and page tables. As there is only one default CMA in the whole system, SMMUs on nodes other than node0 will get remote memory. This leads to significant latency. This patch prov