linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] NUMA emulation for arm64
@ 2024-06-25 12:58 Tvrtko Ursulin
  2024-06-25 12:58 ` [PATCH 1/2] numa: Add simple generic NUMA emulation Tvrtko Ursulin
  2024-06-25 12:58 ` [PATCH 2/2] arm64/numa: Add NUMA emulation for ARM64 Tvrtko Ursulin
  0 siblings, 2 replies; 11+ messages in thread
From: Tvrtko Ursulin @ 2024-06-25 12:58 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: linux-kernel, kernel-dev, Tvrtko Ursulin, Catalin Marinas,
	Will Deacon, Greg Kroah-Hartman

From: Tvrtko Ursulin <tvrtko.ursulin@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@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: “Rafael J. Wysocki" <rafael@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



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

end of thread, other threads:[~2024-08-22  9:32 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-25 12:58 [PATCH 0/2] NUMA emulation for arm64 Tvrtko Ursulin
2024-06-25 12:58 ` [PATCH 1/2] numa: Add simple generic NUMA emulation Tvrtko Ursulin
2024-06-26  7:38   ` Greg Kroah-Hartman
2024-06-26 11:47     ` Tvrtko Ursulin
2024-07-03  7:47       ` Tvrtko Ursulin
2024-08-08 11:56       ` Tvrtko Ursulin
2024-08-08 16:27         ` Jonathan Cameron
2024-08-12 16:35           ` Tvrtko Ursulin
2024-08-22  9:28             ` Mike Rapoport
2024-06-26  7:39   ` Greg Kroah-Hartman
2024-06-25 12:58 ` [PATCH 2/2] arm64/numa: Add NUMA emulation for ARM64 Tvrtko Ursulin

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).