Patch[1] allow to set NODES_SHIFT between 8 and 10 on MAXSMP. Patch[2] set NODES_SHIFT to 8 for both x86_64 and ARM64 defconfig.
Liu Shixin (2): x86/Kconfig: allow NODES_SHIFT to be set on MAXSMP openeuler_defconfig: set CONFIG_NODES_SHIFT to 8 for both x86_64/ARM64
arch/arm64/configs/openeuler_defconfig | 2 +- arch/x86/Kconfig | 3 ++- arch/x86/configs/openeuler_defconfig | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-)
反馈: 您发送到kernel@openeuler.org的补丁/补丁集,已成功转换为PR! PR链接地址: https://gitee.com/openeuler/kernel/pulls/4044 邮件列表地址:https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/3...
FeedBack: The patch(es) which you have sent to kernel@openeuler.org mailing list has been converted to a pull request successfully! Pull request link: https://gitee.com/openeuler/kernel/pulls/4044 Mailing list address: https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/3...
hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I8UT5S CVE: NA
--------------------------------
Allow to set NODES_SHIFT to [8, 10] on MAXSMP.
Signed-off-by: Liu Shixin liushixin2@huanwei.com --- arch/x86/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 9742c1a3c608..3b343dc50b77 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -1598,7 +1598,8 @@ config NUMA_EMU number of nodes. This is only useful for debugging.
config NODES_SHIFT - int "Maximum NUMA Nodes (as a power of 2)" if !MAXSMP + int "Maximum NUMA Nodes (as a power of 2)" + range 8 10 if MAXSMP range 1 10 default "10" if MAXSMP default "6" if X86_64
hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I8UT5S CVE: NA
--------------------------------
There is no extra bit in pageflags for new flag on x86_64. Since 256 nodes is enough for x86_64, reduce CONFIG_NODES_SHIFT to 8 to obtain two unused bits on x86_64.
On arm64, 128 node is not enough, so raise CONFIG_NODES_SHIFT to 8.
Signed-off-by: Liu Shixin liushixin2@huawei.com --- arch/arm64/configs/openeuler_defconfig | 2 +- arch/x86/configs/openeuler_defconfig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/configs/openeuler_defconfig b/arch/arm64/configs/openeuler_defconfig index 35dd6141f057..00bcff69439a 100644 --- a/arch/arm64/configs/openeuler_defconfig +++ b/arch/arm64/configs/openeuler_defconfig @@ -454,7 +454,7 @@ CONFIG_NR_CPUS=4096 CONFIG_HOTPLUG_CPU=y # CONFIG_ARM64_BOOTPARAM_HOTPLUG_CPU0 is not set CONFIG_NUMA=y -CONFIG_NODES_SHIFT=7 +CONFIG_NODES_SHIFT=8 # CONFIG_HZ_100 is not set CONFIG_HZ_250=y # CONFIG_HZ_300 is not set diff --git a/arch/x86/configs/openeuler_defconfig b/arch/x86/configs/openeuler_defconfig index dfefc129ed0e..9d57187690aa 100644 --- a/arch/x86/configs/openeuler_defconfig +++ b/arch/x86/configs/openeuler_defconfig @@ -453,7 +453,7 @@ CONFIG_NUMA_AWARE_SPINLOCKS=y CONFIG_AMD_NUMA=y CONFIG_X86_64_ACPI_NUMA=y CONFIG_NUMA_EMU=y -CONFIG_NODES_SHIFT=10 +CONFIG_NODES_SHIFT=8 CONFIG_ARCH_SPARSEMEM_ENABLE=y CONFIG_ARCH_SPARSEMEM_DEFAULT=y # CONFIG_ARCH_MEMORY_PROBE is not set