iommu.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] support per-numa CMA for ARM server
@ 2020-06-03  2:42 Barry Song
  2020-06-03  2:42 ` [PATCH 1/3] dma-direct: provide the ability to reserve per-numa CMA Barry Song
                   ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: Barry Song @ 2020-06-03  2:42 UTC (permalink / raw)
  To: hch, m.szyprowski, robin.murphy, catalin.marinas
  Cc: linux-kernel, linuxarm, iommu, prime.zeng, linux-arm-kernel

Right now, smmu is using dma_alloc_coherent() to get memory to save queues
and tables. Typically, on ARM64 server, there is a default CMA located at
node0, which could be far away from node2, node3 etc.
Saving queues and tables remotely will increase the latency of ARM SMMU
significantly. For example, when SMMU is at node2 and the default global
CMA is at node0, after sending a CMD_SYNC in an empty command queue, we
have to wait more than 550ns for the completion of the command CMD_SYNC.
However, if we save them locally, we only need to wait for 240ns.

with per-numa CMA, smmu will get memory from local numa node to save command
queues and page tables. that means dma_unmap latency will be shrunk much.

Meanwhile, when iommu.passthrough is on, device drivers which call dma_
alloc_coherent() will also get local memory and avoid the travel between
numa nodes.

Barry Song (3):
  dma-direct: provide the ability to reserve per-numa CMA
  arm64: mm: reserve hugetlb CMA after numa_init
  arm64: mm: reserve per-numa CMA after numa_init

 arch/arm64/mm/init.c           | 12 ++++++----
 include/linux/dma-contiguous.h |  4 ++++
 kernel/dma/Kconfig             | 10 ++++++++
 kernel/dma/contiguous.c        | 43 +++++++++++++++++++++++++++++++++-
 4 files changed, 63 insertions(+), 6 deletions(-)

-- 
2.23.0


_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2020-06-09 15:33 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-03  2:42 [PATCH 0/3] support per-numa CMA for ARM server Barry Song
2020-06-03  2:42 ` [PATCH 1/3] dma-direct: provide the ability to reserve per-numa CMA Barry Song
2020-06-03  6:55   ` kbuild test robot
2020-06-03  7:18   ` kbuild test robot
2020-06-03  7:18   ` [RFC PATCH] dma-direct: dma_contiguous_pernuma_area[] can be static kbuild test robot
2020-06-04 11:36   ` [PATCH 1/3] dma-direct: provide the ability to reserve per-numa CMA Dan Carpenter
2020-06-05  6:04     ` Song Bao Hua (Barry Song)
2020-06-05  8:57       ` Dan Carpenter
2020-06-06  3:46         ` [kbuild-all] " Philip Li
2020-06-06 10:15           ` Song Bao Hua (Barry Song)
2020-06-05 13:57   ` kernel test robot
2020-06-03  2:42 ` [PATCH 2/3] arm64: mm: reserve hugetlb CMA after numa_init Barry Song
2020-06-03  3:22   ` Roman Gushchin via iommu
2020-06-07 20:14     ` Matthias Brugger
2020-06-08  0:50       ` Song Bao Hua (Barry Song)
2020-06-09 15:33         ` Matthias Brugger
2020-06-03  2:42 ` [PATCH 3/3] arm64: mm: reserve per-numa " Barry Song

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).