linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RFC 0/5] support NUMA emulation for arm64
@ 2023-10-12  2:48 Rongwei Wang
  2023-10-12  2:48 ` [PATCH RFC 1/5] mm/numa: move numa emulation APIs into generic files Rongwei Wang
                   ` (6 more replies)
  0 siblings, 7 replies; 16+ messages in thread
From: Rongwei Wang @ 2023-10-12  2:48 UTC (permalink / raw)
  To: linux-arm-kernel, linux-kernel, linux-mm
  Cc: akpm, willy, catalin.marinas, dave.hansen, tj, mingo

A brief introduction
====================

The NUMA emulation can fake more node base on a single
node system, e.g.

one node system:

[root@localhost ~]# numactl -H
available: 1 nodes (0)
node 0 cpus: 0 1 2 3 4 5 6 7
node 0 size: 31788 MB
node 0 free: 31446 MB
node distances:
node   0
  0:  10

add numa=fake=2 (fake 2 node on each origin node):

[root@localhost ~]# numactl -H
available: 2 nodes (0-1)
node 0 cpus: 0 1 2 3 4 5 6 7
node 0 size: 15806 MB
node 0 free: 15451 MB
node 1 cpus: 0 1 2 3 4 5 6 7
node 1 size: 16029 MB
node 1 free: 15989 MB
node distances:
node   0   1
  0:  10  10
  1:  10  10

As above shown, a new node has been faked. As cpus, the realization
of x86 NUMA emulation is kept. Maybe each node should has 4 cores is
better (not sure, next to do if so).

Why do this
===========

It seems has following reasons:
  (1) In x86 host, apply NUMA emulation can fake more nodes environment
      to test or verify some performance stuff, but arm64 only has
      one method that modify ACPI table to do this. It's troublesome
      more or less.
  (2) Reduce competition for some locks. Here an example we found:
      will-it-scale/tlb_flush1_processes -t 96 -s 10, it shows obvious
      hotspot on lruvec->lock when test in single environment. What's
      more, The performance improved greatly if test in two more nodes
      system. The data shows below (more is better):

      ---------------------------------------------------------------------
      threads/process |   1     |     12   |     24   |   48     |   96
      ---------------------------------------------------------------------
      one node        | 14 1122 | 110 5372 | 111 2615 | 79 7084  | 72 4516
      ---------------------------------------------------------------------
      numa=fake=2     | 14 1168 | 144 4848 | 215 9070 | 157 0412 | 142 3968
      ---------------------------------------------------------------------
                      | For concurrency 12, no lruvec->lock hotspot. For 24,
      hotspot         | one node has 24% hotspot on lruvec->lock, but
                      | two nodes env hasn't.
      ---------------------------------------------------------------------

As for risks (e.g. numa balance...), they need to be discussed here.

Lastly, this just is a draft, I can improve next if it's acceptable.

Thanks!

Rongwei Wang (5):
  mm/numa: move numa emulation APIs into generic files
  mm: percpu: fix variable type of cpu
  arch_numa: remove __init in early_cpu_to_node()
  mm/numa: support CONFIG_NUMA_EMU for arm64
  mm/numa: migrate leftover numa emulation into mm/numa.c

 arch/x86/Kconfig                          |   8 -
 arch/x86/include/asm/numa.h               |   3 -
 arch/x86/mm/Makefile                      |   1 -
 arch/x86/mm/numa.c                        | 216 +-------------
 arch/x86/mm/numa_internal.h               |  14 +-
 drivers/base/arch_numa.c                  |   7 +-
 include/asm-generic/numa.h                |  33 +++
 include/linux/percpu.h                    |   2 +-
 mm/Kconfig                                |   8 +
 mm/Makefile                               |   1 +
 arch/x86/mm/numa_emulation.c => mm/numa.c | 333 +++++++++++++++++++++-
 11 files changed, 373 insertions(+), 253 deletions(-)
 rename arch/x86/mm/numa_emulation.c => mm/numa.c (63%)

-- 
2.32.0.3.gf3a3e56d6


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2024-02-29  3:27 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-12  2:48 [PATCH RFC 0/5] support NUMA emulation for arm64 Rongwei Wang
2023-10-12  2:48 ` [PATCH RFC 1/5] mm/numa: move numa emulation APIs into generic files Rongwei Wang
2023-10-12  6:05   ` Ingo Molnar
2023-10-12  2:48 ` [PATCH RFC 2/5] mm: percpu: fix variable type of cpu Rongwei Wang
2023-10-12  2:48 ` [PATCH RFC 3/5] arch_numa: remove __init in early_cpu_to_node() Rongwei Wang
2023-10-12  2:48 ` [PATCH RFC 4/5] mm/numa: support CONFIG_NUMA_EMU for arm64 Rongwei Wang
2023-10-12  2:48 ` [PATCH RFC 5/5] mm/numa: migrate leftover numa emulation into mm/numa.c Rongwei Wang
2023-10-12 12:37 ` [PATCH RFC 0/5] support NUMA emulation for arm64 Pierre Gondois
2023-10-12 13:30   ` Rongwei Wang
2023-10-23 13:03     ` Pierre Gondois
2024-02-20 11:36 ` [PATCH v1 0/2] support NUMA emulation for genertic arch Rongwei Wang
2024-02-20 11:36   ` [PATCH v1 1/2] arch_numa: remove __init for early_cpu_to_node Rongwei Wang
2024-02-20 11:36   ` [PATCH v1 2/2] numa: introduce numa emulation for genertic arch Rongwei Wang
2024-02-21  6:12   ` [PATCH v1 0/2] support NUMA " Mike Rapoport
2024-02-21 15:51     ` Pierre Gondois
2024-02-29  3:26       ` Rongwei Wang

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