Re: [PATCH ARM64]: Introduce CONFIG_MAXSMP to allow up to 512 cpus

From: Christoph Lameter (Ampere)
Date: Mon Nov 27 2023 - 14:58:27 EST


On Thu, 23 Nov 2023, Catalin Marinas wrote:

+config NR_CPUS_RANGE_BEGIN
+ int
+ default NR_CPUS_RANGE_END if MAXSMP
+ default 1 if !SMP
+ default 2

We don't support !SMP on arm64.

Ok we can drop that.

+ This is purely to save memory: each supported CPU adds about 8KB
+ to the kernel image.

Is this all needed just to select CPUMASK_OFFSTACK if larger NR_CPUS?
Would something like this do:

diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 7b071a00425d..697d5700bad1 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -119,6 +119,7 @@ config ARM64
select CLONE_BACKWARDS
select COMMON_CLK
select CPU_PM if (SUSPEND || CPU_IDLE)
+ select CPUMASK_OFFSTACK if NR_CPUS > 512
select CRC32
select DCACHE_WORD_ACCESS
select DYNAMIC_FTRACE if FUNCTION_TRACER

togehther with a larger NR_CPUS in defconfig?

Well that is certainly better because it does not introduce an additional kernel config option.