Currently when building the Linux kernel for LoongArch processors there is a maximum limit of 256 CPU cores supported but with a pending patch that limit would be upped to 2,048 CPU cores.
LoongArch processors shipping from Loongson are currently in the 4~16 core space but there’s been talks of the Loongson 3E6000 at 64~128 cores for server CPUs. Those 64~128 core LoongArch processors don’t appear to be shipping in volume yet but in eyeing toward the future it looks like we could be seeing above 256 cores for single or dual socket servers with this MIPS64-derived, RISC-V-inspired domestic Chinese CPU architecture.
This patch bumps the max CPU limit “NR_CPUS” from 256 to a possible 2048 CPU core limit. Besides adjusting the NR_CPUS Kconfig range, some other minor kernel code changes are also needed to up the threshold from 256 to 2048 cores. The 2048 core limit was chosen as the current IPI hardware can only handle up to a theoretical 2048 cores.
While this LoongArch upper-limit threshold is being 2,048 cores doesn’t mean Loongson will be launching products anytime soon that approach that limit. Linux x86_64 kernel builds can commonly support up to 8,192 cores.