linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] powerpc/64s: introduce CONFIG_MAXSMP to test very large SMP
@ 2021-11-09  6:51 Nicholas Piggin
  2021-11-09 16:16 ` Christophe Leroy
  0 siblings, 1 reply; 6+ messages in thread
From: Nicholas Piggin @ 2021-11-09  6:51 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Nicholas Piggin

Similarly to x86, add MAXSMP that should help flush out problems with
vary large SMP and other values associated with very big systems.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
Since v1:
- Reduce MAXSMP NR_CPUS to 8192 if COMPILE_TEST, to reduce compile errors
  that aren't caught by existing x86 builds.

Thanks,
Nick

 arch/powerpc/Kconfig                   | 8 ++++++++
 arch/powerpc/platforms/Kconfig.cputype | 9 +++++++--
 2 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index b8f6185d3998..d585fcfa456f 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -64,6 +64,13 @@ config NEED_PER_CPU_EMBED_FIRST_CHUNK
 config NEED_PER_CPU_PAGE_FIRST_CHUNK
 	def_bool y if PPC64
 
+config MAXSMP
+	bool "Enable Maximum number of SMP Processors and NUMA Nodes"
+	depends on SMP && DEBUG_KERNEL && PPC_BOOK3S_64
+	help
+	  Enable maximum number of CPUS and NUMA Nodes for this architecture.
+	  If unsure, say N.
+
 config NR_IRQS
 	int "Number of virtual interrupt numbers"
 	range 32 1048576
@@ -666,6 +673,7 @@ config NUMA
 
 config NODES_SHIFT
 	int
+	default "10" if MAXSMP
 	default "8" if PPC64
 	default "4"
 	depends on NUMA
diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/platforms/Kconfig.cputype
index a208997ade88..14c275e0ff93 100644
--- a/arch/powerpc/platforms/Kconfig.cputype
+++ b/arch/powerpc/platforms/Kconfig.cputype
@@ -475,9 +475,14 @@ config SMP
 
 	  If you don't know what to do here, say N.
 
+# MAXSMP sets 8192 if COMPILE_TEST because that's what x86 has flushed out.
+# Exceeding that will cause a lot of compile errors. Have to deal with those
+# first.
 config NR_CPUS
-	int "Maximum number of CPUs (2-8192)" if SMP
-	range 2 8192 if SMP
+	int "Maximum number of CPUs (2-8192)" if SMP && !MAXSMP
+	range 2 16384 if SMP
+	default 16384 if MAXSMP && !COMPILE_TEST
+	default 8192 if MAXSMP && COMPILE_TEST
 	default "1" if !SMP
 	default "32" if PPC64
 	default "4"
-- 
2.23.0


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

end of thread, other threads:[~2021-11-23  5:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-09  6:51 [PATCH v2] powerpc/64s: introduce CONFIG_MAXSMP to test very large SMP Nicholas Piggin
2021-11-09 16:16 ` Christophe Leroy
2021-11-11 10:32   ` Michael Ellerman
2021-11-23  1:01     ` Michael Ellerman
2021-11-23  5:14       ` Nicholas Piggin
2021-11-23  5:16         ` Nicholas Piggin

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