1
1
openwrt/config
John Audia 65d36329e3 x86: make CONFIG_NR_CPUS a tunable (2-512)
Add KERNEL_NR_CPUS option in Global build settings → Kernel build
options, allowing users to set maximum CPU count (2-512) for the image.

Defaults:
- x86_64: 512 CPUs (backward compatible)
- x86: 8 CPUs (fix broken single-CPU default)

Per-CPU data structures consume ~100-200KB each.
On a 4-core system configured to NR_CPUS=4, this frees approx 76 MB
of RAM: (512 - 4) × 150 KB = ~76 MB

Note: CONFIG_NR_CPUS_RANGE_{BEGIN,END}= and CONFIG_NR_CPUS_DEFAULT= are
set by the build system and will default to 2/512/64 per arch/x86/Kconfig
These are harmless metadata and don't affect memory allocation.

Note pending https://github.com/openwrt/openwrt/pull/21407

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/21078
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-03-28 11:51:11 +01:00
..
check-hostcxx.sh config: add a knob to use the mold linker for packages 2023-07-04 20:25:40 +02:00
check-uname.sh build: add HOST_OS_LINUX and HOST_OS_MACOS config symbols 2021-11-01 16:37:52 +01:00
Config-build.in config: add build config option to sign each .apk package 2026-03-02 11:08:10 +01:00
Config-devel.in tools: add options to optimize host binaries 2025-05-04 18:25:03 +02:00
Config-images.in microchipsw: lan969x: add Microchip EV23X71A 2025-12-03 12:13:17 +01:00
Config-kernel.in x86: make CONFIG_NR_CPUS a tunable (2-512) 2026-03-28 11:51:11 +01:00