[PATCH 0/2] NUMA emulation for arm64

Tvrtko Ursulin tursulin at igalia.com
Tue Jun 25 05:58:01 PDT 2024


From: Tvrtko Ursulin <tvrtko.ursulin at igalia.com>

This series adds a very simple NUMA emulation implementation and enables
selecting it on arm64 platforms.

Obvious question is why? Short answer - it can bring a significant performance
uplift on Raspberry Pi 5.

Longer answer is that splitting the physical RAM into chunks, and utilising an
allocation policy such as interleaving, can enable the BCM2721 memory controller
to better utilise parallelism in physical memory chip organisation.

In more conrete numbers, testing with Geekbench 6 shows that splitting into four
emulated NUMA nodes can uplift the single core score of the benchmark by around
6%, and the multi-core by around 18%.

Code is quite simple and new functionality can be enabled using the new
NUMA_EMULATION Kconfig option and then at runtime using the existing (shared
with other platforms) numa=fake=<N> kernel boot argument.

Note however that the default allocation policy is not interleaving and further
steps are required to "unlock" the performance uplift.

Simplest method is probably to launch test programs via the
"numactl --interleave=all COMMAND" wrapper, but it is also possible to change
the system wide policy via systemd configuration.

Cc: Catalin Marinas <catalin.marinas at arm.com>
Cc: Will Deacon <will at kernel.org>
Cc: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
Cc: “Rafael J. Wysocki" <rafael at kernel.org>

Maíra Canal (2):
  numa: Add simple generic NUMA emulation
  arm64/numa: Add NUMA emulation for ARM64

 arch/arm64/Kconfig            | 10 ++++++
 drivers/base/Kconfig          |  7 ++++
 drivers/base/Makefile         |  1 +
 drivers/base/arch_numa.c      |  6 ++++
 drivers/base/numa_emulation.c | 67 +++++++++++++++++++++++++++++++++++
 drivers/base/numa_emulation.h | 21 +++++++++++
 6 files changed, 112 insertions(+)
 create mode 100644 drivers/base/numa_emulation.c
 create mode 100644 drivers/base/numa_emulation.h

-- 
2.44.0




More information about the linux-arm-kernel mailing list