Skip to contentSkip to conversation

Increase the upper bound on NR_CPUS.

PATCH In review Tony Breeds 4 participants 6 messages Nov 29, 2007 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Increase the upper bound on NR_CPUS.

---
why not?

 arch/powerpc/platforms/Kconfig.cputype |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
arch/powerpc/platforms/Kconfig.cputype +2 -2
index 99684ea..5d70862 100644
@@ -220,8 +220,8 @@ config SMP
 	  If you don't know what to do here, say N.
 
 config NR_CPUS
-	int "Maximum number of CPUs (2-128)"
-	range 2 128
+	int "Maximum number of CPUs (2-1024)"
+	range 2 1024
 	depends on SMP
 	default "32" if PPC64
 	default "4"

Yours Tony

linux.conf.au http://linux.conf.au/ || http://lca2008.linux.org.au/
Jan 28 - Feb 02 2008 The Australian Linux Technical Conference!

#1 lore raw
Quoted 4 lines · Tony Breeds

---
why not?

How big is say a pseries_defconfig with NR_CPUS = 1024 ?

cheers

Signature · 8 lines
Michael Ellerman
OzLabs, IBM Australia Development Lab

wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)

We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person
#2 lore raw
Quoted 7 lines · Michael Ellerman
Quoted 4 lines · Tony Breeds

---
why not?

How big is say a pseries_defconfig with NR_CPUS = 1024 ?

This is a ppc64_defconfig, with a couple of extra patches, and NR_CPUS=1024

tony@Sprygo:~/scratch/working$ size ../working_out/arch/powerpc/boot/zImage.{pmac,pseries,iseries} ../working_out/vmlinux
   text    data     bss      dec     hex filename
3697092    5356   48232  3750680  393b18 ../working_out/arch/powerpc/boot/zImage.pmac
3697092    5356   48232  3750680  393b18 ../working_out/arch/powerpc/boot/zImage.pseries
8101340 4994176  815544 13911060  d44414 ../working_out/arch/powerpc/boot/zImage.iseries
8101340 4994176  815544 13911060  d44414 ../working_out/vmlinux

Yours Tony

linux.conf.au http://linux.conf.au/ || http://lca2008.linux.org.au/
Jan 28 - Feb 02 2008 The Australian Linux Technical Conference!

#3 lore raw
Quoted 12 lines · Tony Breeds
Quoted 7 lines · Michael Ellerman
Quoted 4 lines · Tony Breeds

---
why not?

How big is say a pseries_defconfig with NR_CPUS = 1024 ?

This is a ppc64_defconfig, with a couple of extra patches, and NR_CPUS=1024

Quoted 6 lines
tony@Sprygo:~/scratch/working$ size ../working_out/arch/powerpc/boot/zImage.{pmac,pseries,iseries} ../working_out/vmlinux
   text    data     bss      dec     hex filename
3697092    5356   48232  3750680  393b18 ../working_out/arch/powerpc/boot/zImage.pmac
3697092    5356   48232  3750680  393b18 ../working_out/arch/powerpc/boot/zImage.pseries
8101340 4994176  815544 13911060  d44414 ../working_out/arch/powerpc/boot/zImage.iseries
8101340 4994176  815544 13911060  d44414 ../working_out/vmlinux

OK, not too bad for the zImage, but the vmlinux has grown a bit, we obviously have lots of foo[NR_CPUS].

NR_CPUS = 32 vs 1024

text data bss dec hex filename

7889287 1786256  529248 10204791         9bb677 vmlinux
7901531 4946864  814432 13662827         d07a6b vmlinux

cheers

Signature · 8 lines
Michael Ellerman
OzLabs, IBM Australia Development Lab

wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)

We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person
#5 lore raw
In reply to Tony Breeds
Quoted 1 line · Tony Breeds

why not?

In the past I've seen run-time problems because some parts of the code kmalloc NR_CPUS sized arrays, which can easily grow beyond the kmalloc limit of 128kb. Have you tried running some tests on a small machine with the big NR_CPUS?

	Arnd <><