linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC/RFT PATCH 0/6] Unify NUMA implementation between ARM64 & RISC-V
@ 2020-08-14 21:47 Atish Patra
  2020-08-14 21:47 ` [RFC/RFT PATCH 1/6] numa: Move numa implementation to common code Atish Patra
                   ` (5 more replies)
  0 siblings, 6 replies; 23+ messages in thread
From: Atish Patra @ 2020-08-14 21:47 UTC (permalink / raw)
  To: linux-kernel
  Cc: Atish Patra, Albert Ou, Andrew Morton, Anshuman Khandual,
	Anup Patel, Arnd Bergmann, Catalin Marinas, Greentime Hu,
	Greg Kroah-Hartman, linux-arch, linux-riscv, Lorenzo Pieralisi,
	Mike Rapoport, Nick Hu, Palmer Dabbelt, Paul Walmsley,
	Rafael J. Wysocki, Rob Herring, Steven Price, Will Deacon,
	Zong Li, Ganapatrao Kulkarni, linux-arm-kernel

This series attempts to move the ARM64 numa implementation to common
code so that RISC-V can leverage that as well instead of reimplementing
it again.

RISC-V specific bits are based on initial work done by Greentime Hu [1] but
modified to reuse the common implementation to avoid duplication.

[1] https://lkml.org/lkml/2020/1/10/233

This series has been tested on qemu with numa enabled for both RISC-V & ARM64.
It would be great if somebody can test it on numa capable ARM64 hardware platforms.
This patch series doesn't modify the maintainers list for the common code (arch_numa)
as I am not sure if somebody from ARM64 community or Greg should take up the
maintainership. Ganapatrao was the original author of the arm64 version.
I would be happy to update that in the next revision once it is decided.

# numactl --hardware
available: 2 nodes (0-1)
node 0 cpus: 0 1 2 3
node 0 size: 486 MB
node 0 free: 470 MB
node 1 cpus: 4 5 6 7
node 1 size: 424 MB
node 1 free: 408 MB
node distances:
node   0   1 
  0:  10  20 
  1:  20  10 
# numactl -show
policy: default
preferred node: current
physcpubind: 0 1 2 3 4 5 6 7 
cpubind: 0 1 
nodebind: 0 1 
membind: 0 1 

For RISC-V, the following qemu series is a pre-requisite to test the patches in Qemu.

https://patchwork.kernel.org/project/qemu-devel/list/?series=303313

The patches are also available at

https://github.com/atishp04/linux/tree/5.10_numa_unified

There may be some minor conflicts with Mike's cleanup series [2] depending on the
order in which these two series are being accepted. I can rebase on top his series
if required.

[2] https://lkml.org/lkml/2020/7/28/39

Atish Patra (5):
numa: Move numa implementation to common code
arm64, numa: Change the numa init function name to be generic
arm64, numa: Move pcibus_to_node definition to generic numa code
riscv: Separate memory init from paging init
riscv: Add numa support for riscv64 platform

Greentime Hu (1):
riscv: Add support pte_protnone and pmd_protnone if
CONFIG_NUMA_BALANCING

arch/arm64/Kconfig                            |  1 +
arch/arm64/include/asm/numa.h                 | 45 +---------------
arch/arm64/kernel/pci.c                       | 10 ----
arch/arm64/mm/Makefile                        |  1 -
arch/arm64/mm/init.c                          |  4 +-
arch/riscv/Kconfig                            | 31 ++++++++++-
arch/riscv/include/asm/mmzone.h               | 13 +++++
arch/riscv/include/asm/numa.h                 |  8 +++
arch/riscv/include/asm/pci.h                  | 10 ++++
arch/riscv/include/asm/pgtable.h              | 21 ++++++++
arch/riscv/kernel/setup.c                     | 12 ++++-
arch/riscv/kernel/smpboot.c                   | 12 ++++-
arch/riscv/mm/init.c                          | 10 +++-
drivers/base/Kconfig                          |  6 +++
drivers/base/Makefile                         |  1 +
.../mm/numa.c => drivers/base/arch_numa.c     | 19 ++++++-
include/asm-generic/numa.h                    | 51 +++++++++++++++++++
17 files changed, 190 insertions(+), 65 deletions(-)
create mode 100644 arch/riscv/include/asm/mmzone.h
create mode 100644 arch/riscv/include/asm/numa.h
rename arch/arm64/mm/numa.c => drivers/base/arch_numa.c (97%)
create mode 100644 include/asm-generic/numa.h

--
2.24.0


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

end of thread, other threads:[~2020-08-30  7:22 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-14 21:47 [RFC/RFT PATCH 0/6] Unify NUMA implementation between ARM64 & RISC-V Atish Patra
2020-08-14 21:47 ` [RFC/RFT PATCH 1/6] numa: Move numa implementation to common code Atish Patra
2020-08-14 23:19   ` Randy Dunlap
2020-08-19  3:18   ` Anshuman Khandual
2020-08-19 19:18     ` Atish Patra
2020-08-20  3:20       ` Anshuman Khandual
2020-08-21 21:58         ` Atish Patra
2020-08-28  9:13           ` Jonathan Cameron
2020-08-28  9:22   ` Jonathan Cameron
2020-08-29  0:31     ` Atish Patra
2020-08-14 21:47 ` [RFC/RFT PATCH 2/6] arm64, numa: Change the numa init function name to be generic Atish Patra
2020-08-28  9:35   ` Jonathan Cameron
2020-08-29  0:39     ` Atish Patra
2020-08-14 21:47 ` [RFC/RFT PATCH 3/6] arm64, numa: Move pcibus_to_node definition to generic numa code Atish Patra
2020-08-28  9:48   ` Jonathan Cameron
2020-08-28 16:15     ` Bjorn Helgaas
2020-08-29  1:11       ` Atish Patra
2020-08-30  2:54         ` Bjorn Helgaas
2020-08-30  7:22           ` Atish Patra
2020-08-14 21:47 ` [RFC/RFT PATCH 4/6] riscv: Separate memory init from paging init Atish Patra
2020-08-14 21:47 ` [RFC/RFT PATCH 5/6] riscv: Add support pte_protnone and pmd_protnone if CONFIG_NUMA_BALANCING Atish Patra
2020-08-14 21:47 ` [RFC/RFT PATCH 6/6] riscv: Add numa support for riscv64 platform Atish Patra
2020-08-14 23:21   ` Randy Dunlap

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