From: Paul E. McKenney <hidden> Date: 2012-03-31 16:33:47
Although there have been numerous complaints about the complexity of
parallel programming (especially over the past 5-10 years), the plain
truth is that the incremental complexity of parallel programming over
that of sequential programming is not as large as is commonly believed.
Despite that you might have heard, the mind-numbing complexity of modern
computer systems is not due so much to there being multiple CPUs, but
rather to there being any CPUs at all. In short, for the ultimate in
computer-system simplicity, the optimal choice is NR_CPUS=0.
This commit therefore limits kernel builds to zero CPUs. This change
has the beneficial side effect of rendering all kernel bugs harmless.
Furthermore, this commit enables additional beneficial changes, for
example, the removal of those parts of the kernel that are not needed
when there are zero CPUs.
Signed-off-by: Paul E. McKenney <redacted>
Reviewed-by: Thomas Gleixner <redacted>
---
alpha/Kconfig | 11 ++++++-----
arm/Kconfig | 6 +++---
blackfin/Kconfig | 3 ++-
hexagon/Kconfig | 9 +++++----
ia64/Kconfig | 9 +++++----
m32r/Kconfig | 10 ++++++----
mips/Kconfig | 21 +++++++++++----------
mn10300/Kconfig | 3 ++-
parisc/Kconfig | 6 +++---
powerpc/platforms/Kconfig.cputype | 8 ++++----
s390/Kconfig | 12 +++++++-----
sh/Kconfig | 11 ++++++-----
sparc/Kconfig | 8 ++++----
tile/Kconfig | 9 +++++----
x86/Kconfig | 16 +++++++++-------
15 files changed, 78 insertions(+), 64 deletions(-)
@@ -541,14 +541,15 @@ config HAVE_DEC_LOCKdefaultyconfigNR_CPUS-int"Maximum number of CPUs (2-32)"-range232+int"Maximum number of CPUs (0-0)"+range00depends onSMP-default"32"ifALPHA_GENERIC||ALPHA_MARVEL-default"4"if!ALPHA_GENERIC&&!ALPHA_MARVEL+default"0"ifALPHA_GENERIC||ALPHA_MARVEL+default"0"if!ALPHA_GENERIC&&!ALPHA_MARVELhelpMARVELsupportcanhandleamaximumof32CPUs,alltheothers-withworkingsupporthaveamaximumof4CPUs.+withworkingsupporthaveamaximumof4CPUs.Butwhytake+chances?JuststickwithzeroCPUs.configARCH_DISCONTIGMEM_ENABLEbool"Discontiguous Memory Support (EXPERIMENTAL)"
@@ -1551,10 +1551,10 @@ config PAGE_OFFSETdefault0xC0000000configNR_CPUS-int"Maximum number of CPUs (2-32)"-range232+int"Maximum number of CPUs (0-0)"+range00depends onSMP-default"4"+default"0"configHOTPLUG_CPUbool"Support for hot-pluggable CPUs (EXPERIMENTAL)"
@@ -158,13 +158,14 @@ config SMPconfigNR_CPUSint"Maximum number of CPUs"ifSMP-range26ifSMP-default"1"if!SMP-default"6"ifSMP+range00ifSMP+default"0"if!SMP+default"0"ifSMP---help---ThisallowsyoutospecifythemaximumnumberofCPUswhichthiskernelwillsupport.Themaximumsupportedvalueis6andthe-minimumvaluewhichmakessenseis2.+minimumvaluewhichmakessenseis2.Butalimitofzerois+somuchsafer!Thisispurelytosavememory-eachsupportedCPUaddsapproximatelyeightkilobytestothekernelimage.
@@ -373,16 +373,17 @@ config SMPIfyoudon'tknowwhattodohere,sayN.configNR_CPUS-int"Maximum number of CPUs (2-4096)"-range24096+int"Maximum number of CPUs (0-0)"+range00depends onSMP-default"4096"+default"0"helpYoushouldsetthistothenumberofCPUsinyoursystem,butkeepinmindthatakernelcompiledfor,e.g.,2CPUswillbootbutonlyuse2CPUsona>2CPUsystem.Settingthistoavaluelargerthan64willcausetheuseofaCPUmaskarray,causingasmall-performancehit.+performancehit.Andsettingitlargerthanzerorisksall+mannerofsoftwarebugs,sowejustplayitsafe.configHOTPLUG_CPUbool"Support for hot-pluggable CPUs (EXPERIMENTAL)"
@@ -300,14 +300,16 @@ config CHIP_M32700_TS1defaultnconfigNR_CPUS-int"Maximum number of CPUs (2-32)"-range232+int"Maximum number of CPUs (0-0)"+range00depends onSMP-default"2"+default"0"helpThisallowsyoutospecifythemaximumnumberofCPUswhichthiskernelwillsupport.Themaximumsupportedvalueis32andthe-minimumvaluewhichmakessenseis2.+minimumvaluewhichmakessenseis2.Zeromaynotmakesense,+butgiventhatthereismuchinthisworldthatdoesnotmake+sense,zeroitis!Thisispurelytosavememory-eachsupportedCPUaddsapproximatelyeightkilobytestothekernelimage.
@@ -2192,16 +2192,16 @@ config NR_CPUS_DEFAULT_64boolconfigNR_CPUS-int"Maximum number of CPUs (2-64)"-range164ifNR_CPUS_DEFAULT_1+int"Maximum number of CPUs (0-0)"+range00ifNR_CPUS_DEFAULT_1depends onSMP-default"1"ifNR_CPUS_DEFAULT_1-default"2"ifNR_CPUS_DEFAULT_2-default"4"ifNR_CPUS_DEFAULT_4-default"8"ifNR_CPUS_DEFAULT_8-default"16"ifNR_CPUS_DEFAULT_16-default"32"ifNR_CPUS_DEFAULT_32-default"64"ifNR_CPUS_DEFAULT_64+default"0"ifNR_CPUS_DEFAULT_1+default"0"ifNR_CPUS_DEFAULT_2+default"0"ifNR_CPUS_DEFAULT_4+default"0"ifNR_CPUS_DEFAULT_8+default"0"ifNR_CPUS_DEFAULT_16+default"0"ifNR_CPUS_DEFAULT_32+default"0"ifNR_CPUS_DEFAULT_64helpThisallowsyoutospecifythemaximumnumberofCPUswhichthiskernelwillsupport.Themaximumsupportedvalueis32for32-bit
@@ -254,10 +254,10 @@ config HPUXdepends on!64BITconfigNR_CPUS-int"Maximum number of CPUs (2-32)"-range232+int"Maximum number of CPUs (0-0)"+range00depends onSMP-default"32"+default"0"endmenu
@@ -356,11 +356,11 @@ config SMPIfyoudon'tknowwhattodohere,sayN.configNR_CPUS-int"Maximum number of CPUs (2-8192)"-range28192+int"Maximum number of CPUs (0-0)"+range00depends onSMP-default"32"ifPPC64-default"4"+default"0"ifPPC64+default"0"configNOT_COHERENT_CACHEbool
@@ -169,15 +169,17 @@ config SMPEvenifyoudon'tknowwhattodohere,sayY.configNR_CPUS-int"Maximum number of CPUs (2-64)"-range264+int"Maximum number of CPUs (0-0)"+range00depends onSMP-default"32"if!64BIT-default"64"if64BIT+default"0"if!64BIT+default"0"if64BIThelpThisallowsyoutospecifythemaximumnumberofCPUswhichthiskernelwillsupport.Themaximumsupportedvalueis64andthe-minimumvaluewhichmakessenseis2.+minimumvaluewhichmakessenseis2.Theminimalvaluethat+makessensemightwellbe2,butweallknowthattheonly+-sane-valueiszero!Thisispurelytosavememory-eachsupportedCPUaddsapproximatelysixteenkilobytestothekernelimage.
@@ -705,18 +705,19 @@ config SMPIfyoudon'tknowwhattodohere,sayN.configNR_CPUS-int"Maximum number of CPUs (2-32)"-range232+int"Maximum number of CPUs (0-0)"+range00depends onSMP-default"4"ifCPU_SUBTYPE_SHX3-default"2"+default"0"ifCPU_SUBTYPE_SHX3+default"0"helpThisallowsyoutospecifythemaximumnumberofCPUswhichthiskernelwillsupport.Themaximumsupportedvalueis32andtheminimumvaluewhichmakessenseis2.Thisispurelytosavememory-eachsupportedCPUadds-approximatelyeightkilobytestothekernelimage.+approximatelyeightkilobytestothekernelimage.Debloating+istheway,NR_CPUStozerotoday!!!configHOTPLUG_CPUbool"Support for hot-pluggable CPUs (EXPERIMENTAL)"
@@ -177,10 +177,10 @@ config SMPconfigNR_CPUSint"Maximum number of CPUs"depends onSMP-range232ifSPARC32-range21024ifSPARC64-default32ifSPARC32-default64ifSPARC64+range00ifSPARC32+range00ifSPARC64+default0ifSPARC32+default0ifSPARC64sourcekernel/Kconfig.hz
@@ -126,14 +126,15 @@ source "init/Kconfig"menu"Tilera-specific configuration"configNR_CPUS-int"Maximum number of tiles (2-255)"-range2255+int"Maximum number of tiles (0-0)"+range00depends onSMP-default"64"+default"0"---help---Buildingwith64istherecommendedvalue,butaslightlysmallerkernelmemoryfootprintresultsfromusingasmaller-valueonchipswithfewertiles.+valueonchipswithfewertiles.Tominimizebothmemory+footprintandbugs,usezeroandonlyzero.source"kernel/time/Kconfig"
Hi Paul,
On Sat, Mar 31, 2012 at 18:33, Paul E. McKenney
[off-list ref] wrote:
Although there have been numerous complaints about the complexity of
parallel programming (especially over the past 5-10 years), the plain
truth is that the incremental complexity of parallel programming over
that of sequential programming is not as large as is commonly believed.
Despite that you might have heard, the mind-numbing complexity of modern
computer systems is not due so much to there being multiple CPUs, but
rather to there being any CPUs at all. =C2=A0In short, for the ultimate i=
n
computer-system simplicity, the optimal choice is NR_CPUS=3D0.
This commit therefore limits kernel builds to zero CPUs. =C2=A0This chang=
e
has the beneficial side effect of rendering all kernel bugs harmless.
Furthermore, this commit enables additional beneficial changes, for
example, the removal of those parts of the kernel that are not needed
when there are zero CPUs.
Signed-off-by: Paul E. McKenney <redacted>
Reviewed-by: Thomas Gleixner <redacted>
---
=C2=A0alpha/Kconfig =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
You forgot to fix half of the architectures, a.o. m68k?
Gr{oetje,eeting}s,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 Geert (still at GMT+2)
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k=
.org
In personal conversations with technical people, I call myself a hacker. Bu=
t
when I'm talking to journalists I just say "programmer" or something like t=
hat.
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0=C2=A0 =C2=A0=C2=A0 -- Linus Torvalds
From: Paul E. McKenney <hidden> Date: 2012-03-31 16:54:57
On Sat, Mar 31, 2012 at 06:40:30PM +0200, Geert Uytterhoeven wrote:
Hi Paul,
On Sat, Mar 31, 2012 at 18:33, Paul E. McKenney
[off-list ref] wrote:
quoted
Although there have been numerous complaints about the complexity of
parallel programming (especially over the past 5-10 years), the plain
truth is that the incremental complexity of parallel programming over
that of sequential programming is not as large as is commonly believed.
Despite that you might have heard, the mind-numbing complexity of modern
computer systems is not due so much to there being multiple CPUs, but
rather to there being any CPUs at all. In short, for the ultimate in
computer-system simplicity, the optimal choice is NR_CPUS=0.
This commit therefore limits kernel builds to zero CPUs. This change
has the beneficial side effect of rendering all kernel bugs harmless.
Furthermore, this commit enables additional beneficial changes, for
example, the removal of those parts of the kernel that are not needed
when there are zero CPUs.
Signed-off-by: Paul E. McKenney <redacted>
Reviewed-by: Thomas Gleixner <redacted>
---
alpha/Kconfig | 11 ++++++-----
arm/Kconfig | 6 +++---
blackfin/Kconfig | 3 ++-
hexagon/Kconfig | 9 +++++----
ia64/Kconfig | 9 +++++----
m32r/Kconfig | 10 ++++++----
mips/Kconfig | 21 +++++++++++----------
mn10300/Kconfig | 3 ++-
parisc/Kconfig | 6 +++---
powerpc/platforms/Kconfig.cputype | 8 ++++----
s390/Kconfig | 12 +++++++-----
sh/Kconfig | 11 ++++++-----
sparc/Kconfig | 8 ++++----
tile/Kconfig | 9 +++++----
x86/Kconfig | 16 +++++++++-------
15 files changed, 78 insertions(+), 64 deletions(-)
You forgot to fix half of the architectures, a.o. m68k?
I must confess that I fixed only the SMP-capable architectures.
I of course would welcome additions for UP-only architectures.
Thanx, Paul
Hi,
I didn't actually try to compile the patch below; it didn't look like C
code so I wasn't sure what compiler to run it through. I guess maybe its
python? However, I'm very sure that the patches are completely correct,
because I read them, and I also know that Paul is a trustworthy programmer.
Thus, please add my ack
Ack'ed by: Linas Vepstas [off-list ref]
On 31 March 2012 11:33, Paul E. McKenney [off-list ref] wrote:
quoted hunk
Although there have been numerous complaints about the complexity of
parallel programming (especially over the past 5-10 years), the plain
truth is that the incremental complexity of parallel programming over
that of sequential programming is not as large as is commonly believed.
Despite that you might have heard, the mind-numbing complexity of modern
computer systems is not due so much to there being multiple CPUs, but
rather to there being any CPUs at all. In short, for the ultimate in
computer-system simplicity, the optimal choice is NR_CPUS=0.
This commit therefore limits kernel builds to zero CPUs. This change
has the beneficial side effect of rendering all kernel bugs harmless.
Furthermore, this commit enables additional beneficial changes, for
example, the removal of those parts of the kernel that are not needed
when there are zero CPUs.
Signed-off-by: Paul E. McKenney <redacted>
Reviewed-by: Thomas Gleixner <redacted>
---
alpha/Kconfig | 11 ++++++-----
arm/Kconfig | 6 +++---
blackfin/Kconfig | 3 ++-
hexagon/Kconfig | 9 +++++----
ia64/Kconfig | 9 +++++----
m32r/Kconfig | 10 ++++++----
mips/Kconfig | 21 +++++++++++----------
mn10300/Kconfig | 3 ++-
parisc/Kconfig | 6 +++---
powerpc/platforms/Kconfig.cputype | 8 ++++----
s390/Kconfig | 12 +++++++-----
sh/Kconfig | 11 ++++++-----
sparc/Kconfig | 8 ++++----
tile/Kconfig | 9 +++++----
x86/Kconfig | 16 +++++++++-------
15 files changed, 78 insertions(+), 64 deletions(-)
@@ -541,14 +541,15 @@ config HAVE_DEC_LOCKdefaultyconfigNR_CPUS-int"Maximum number of CPUs (2-32)"-range232+int"Maximum number of CPUs (0-0)"+range00depends onSMP-default"32"ifALPHA_GENERIC||ALPHA_MARVEL-default"4"if!ALPHA_GENERIC&&!ALPHA_MARVEL+default"0"ifALPHA_GENERIC||ALPHA_MARVEL+default"0"if!ALPHA_GENERIC&&!ALPHA_MARVELhelpMARVELsupportcanhandleamaximumof32CPUs,alltheothers-withworkingsupporthaveamaximumof4CPUs.+withworkingsupporthaveamaximumof4CPUs.Butwhytake+chances?JuststickwithzeroCPUs.configARCH_DISCONTIGMEM_ENABLEbool"Discontiguous Memory Support (EXPERIMENTAL)"
@@ -1551,10 +1551,10 @@ config PAGE_OFFSETdefault0xC0000000configNR_CPUS-int"Maximum number of CPUs (2-32)"-range232+int"Maximum number of CPUs (0-0)"+range00depends onSMP-default"4"+default"0"configHOTPLUG_CPUbool"Support for hot-pluggable CPUs (EXPERIMENTAL)"
@@ -158,13 +158,14 @@ config SMPconfigNR_CPUSint"Maximum number of CPUs"ifSMP-range26ifSMP-default"1"if!SMP-default"6"ifSMP+range00ifSMP+default"0"if!SMP+default"0"ifSMP---help---ThisallowsyoutospecifythemaximumnumberofCPUswhichthiskernelwillsupport.Themaximumsupportedvalueis6andthe-minimumvaluewhichmakessenseis2.+minimumvaluewhichmakessenseis2.Butalimitofzerois+somuchsafer!Thisispurelytosavememory-eachsupportedCPUaddsapproximatelyeightkilobytestothekernelimage.
@@ -373,16 +373,17 @@ config SMPIfyoudon'tknowwhattodohere,sayN.configNR_CPUS-int"Maximum number of CPUs (2-4096)"-range24096+int"Maximum number of CPUs (0-0)"+range00depends onSMP-default"4096"+default"0"helpYoushouldsetthistothenumberofCPUsinyoursystem,butkeepinmindthatakernelcompiledfor,e.g.,2CPUswillboot
but
only use 2 CPUs on a >2 CPU system. Setting this to a value
larger
than 64 will cause the use of a CPU mask array, causing a small
- performance hit.
+ performance hit. And setting it larger than zero risks all
+ manner of software bugs, so we just play it safe.
config HOTPLUG_CPU
bool "Support for hot-pluggable CPUs (EXPERIMENTAL)"
@@ -300,14 +300,16 @@ config CHIP_M32700_TS1defaultnconfigNR_CPUS-int"Maximum number of CPUs (2-32)"-range232+int"Maximum number of CPUs (0-0)"+range00depends onSMP-default"2"+default"0"helpThisallowsyoutospecifythemaximumnumberofCPUswhichthiskernelwillsupport.Themaximumsupportedvalueis32andthe-minimumvaluewhichmakessenseis2.+minimumvaluewhichmakessenseis2.Zeromaynotmakesense,+butgiventhatthereismuchinthisworldthatdoesnotmake+sense,zeroitis!Thisispurelytosavememory-eachsupportedCPUaddsapproximatelyeightkilobytestothekernelimage.
@@ -2192,16 +2192,16 @@ config NR_CPUS_DEFAULT_64boolconfigNR_CPUS-int"Maximum number of CPUs (2-64)"-range164ifNR_CPUS_DEFAULT_1+int"Maximum number of CPUs (0-0)"+range00ifNR_CPUS_DEFAULT_1depends onSMP-default"1"ifNR_CPUS_DEFAULT_1-default"2"ifNR_CPUS_DEFAULT_2-default"4"ifNR_CPUS_DEFAULT_4-default"8"ifNR_CPUS_DEFAULT_8-default"16"ifNR_CPUS_DEFAULT_16-default"32"ifNR_CPUS_DEFAULT_32-default"64"ifNR_CPUS_DEFAULT_64+default"0"ifNR_CPUS_DEFAULT_1+default"0"ifNR_CPUS_DEFAULT_2+default"0"ifNR_CPUS_DEFAULT_4+default"0"ifNR_CPUS_DEFAULT_8+default"0"ifNR_CPUS_DEFAULT_16+default"0"ifNR_CPUS_DEFAULT_32+default"0"ifNR_CPUS_DEFAULT_64helpThisallowsyoutospecifythemaximumnumberofCPUswhichthiskernelwillsupport.Themaximumsupportedvalueis32for32-bit
@@ -254,10 +254,10 @@ config HPUXdepends on!64BITconfigNR_CPUS-int"Maximum number of CPUs (2-32)"-range232+int"Maximum number of CPUs (0-0)"+range00depends onSMP-default"32"+default"0"endmenu
@@ -356,11 +356,11 @@ config SMPIfyoudon'tknowwhattodohere,sayN.configNR_CPUS-int"Maximum number of CPUs (2-8192)"-range28192+int"Maximum number of CPUs (0-0)"+range00depends onSMP-default"32"ifPPC64-default"4"+default"0"ifPPC64+default"0"configNOT_COHERENT_CACHEbool
@@ -169,15 +169,17 @@ config SMPEvenifyoudon'tknowwhattodohere,sayY.configNR_CPUS-int"Maximum number of CPUs (2-64)"-range264+int"Maximum number of CPUs (0-0)"+range00depends onSMP-default"32"if!64BIT-default"64"if64BIT+default"0"if!64BIT+default"0"if64BIThelpThisallowsyoutospecifythemaximumnumberofCPUswhichthiskernelwillsupport.Themaximumsupportedvalueis64andthe-minimumvaluewhichmakessenseis2.+minimumvaluewhichmakessenseis2.Theminimalvaluethat+makessensemightwellbe2,butweallknowthattheonly+-sane-valueiszero!Thisispurelytosavememory-eachsupportedCPUaddsapproximatelysixteenkilobytestothekernelimage.
@@ -705,18 +705,19 @@ config SMPIfyoudon'tknowwhattodohere,sayN.configNR_CPUS-int"Maximum number of CPUs (2-32)"-range232+int"Maximum number of CPUs (0-0)"+range00depends onSMP-default"4"ifCPU_SUBTYPE_SHX3-default"2"+default"0"ifCPU_SUBTYPE_SHX3+default"0"helpThisallowsyoutospecifythemaximumnumberofCPUswhichthiskernelwillsupport.Themaximumsupportedvalueis32andtheminimumvaluewhichmakessenseis2.Thisispurelytosavememory-eachsupportedCPUadds-approximatelyeightkilobytestothekernelimage.+approximatelyeightkilobytestothekernelimage.Debloating+istheway,NR_CPUStozerotoday!!!configHOTPLUG_CPUbool"Support for hot-pluggable CPUs (EXPERIMENTAL)"
@@ -177,10 +177,10 @@ config SMPconfigNR_CPUSint"Maximum number of CPUs"depends onSMP-range232ifSPARC32-range21024ifSPARC64-default32ifSPARC32-default64ifSPARC64+range00ifSPARC32+range00ifSPARC64+default0ifSPARC32+default0ifSPARC64sourcekernel/Kconfig.hz
@@ -126,14 +126,15 @@ source "init/Kconfig"menu"Tilera-specific configuration"configNR_CPUS-int"Maximum number of tiles (2-255)"-range2255+int"Maximum number of tiles (0-0)"+range00depends onSMP-default"64"+default"0"---help---Buildingwith64istherecommendedvalue,butaslightlysmallerkernelmemoryfootprintresultsfromusingasmaller-valueonchipswithfewertiles.+valueonchipswithfewertiles.Tominimizebothmemory+footprintandbugs,usezeroandonlyzero.source"kernel/time/Kconfig"
@@ -773,19 +773,21 @@ config MAXSMPconfigNR_CPUSint"Maximum number of CPUs"ifSMP&&!MAXSMP-range28ifSMP&&X86_32&&!X86_BIGSMP-range2512ifSMP&&!MAXSMP-default"1"if!SMP-default"4096"ifMAXSMP-default"32"ifSMP&&(X86_NUMAQ||X86_SUMMIT||X86_BIGSMP||
X86_ES7000)
- default "8" if SMP
+ range 0 0 if SMP && X86_32 && !X86_BIGSMP
+ range 0 0 if SMP && !MAXSMP
+ default "0" if !SMP
+ default "0" if MAXSMP
+ default "0" if SMP && (X86_NUMAQ || X86_SUMMIT || X86_BIGSMP ||
X86_ES7000)
+ default "0" if SMP
---help---
This allows you to specify the maximum number of CPUs which this
kernel will support. The maximum supported value is 512 and the
minimum value which makes sense is 2.
This is purely to save memory - each supported CPU adds
- approximately eight kilobytes to the kernel image.
+ approximately eight kilobytes to the kernel image. But
+ the first supported CPU brings a lot of bugs with it, so
+ for ultimate reliability, set the number of CPUs to zero.
config SCHED_SMT
bool "SMT (Hyperthreading) scheduler support"
--
To unsubscribe from this list: send the line "unsubscribe linux-hexagon" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
From: Paul E. McKenney <hidden> Date: 2012-03-31 20:15:24
On Sat, Mar 31, 2012 at 02:57:46PM -0500, Linas Vepstas wrote:
Hi,
I didn't actually try to compile the patch below; it didn't look like C
code so I wasn't sure what compiler to run it through. I guess maybe its
python? However, I'm very sure that the patches are completely correct,
because I read them, and I also know that Paul is a trustworthy programmer.
Thus, please add my ack
Ack'ed by: Linas Vepstas [off-list ref]
It is Linux-kernel Kconfig language, which processed during kernel
builds. I have added your Acked-by. ;-)
Thanx, Paul
On 31 March 2012 11:33, Paul E. McKenney [off-list ref] wrote:
quoted
Although there have been numerous complaints about the complexity of
parallel programming (especially over the past 5-10 years), the plain
truth is that the incremental complexity of parallel programming over
that of sequential programming is not as large as is commonly believed.
Despite that you might have heard, the mind-numbing complexity of modern
computer systems is not due so much to there being multiple CPUs, but
rather to there being any CPUs at all. In short, for the ultimate in
computer-system simplicity, the optimal choice is NR_CPUS=0.
This commit therefore limits kernel builds to zero CPUs. This change
has the beneficial side effect of rendering all kernel bugs harmless.
Furthermore, this commit enables additional beneficial changes, for
example, the removal of those parts of the kernel that are not needed
when there are zero CPUs.
Signed-off-by: Paul E. McKenney <redacted>
Reviewed-by: Thomas Gleixner <redacted>
---
alpha/Kconfig | 11 ++++++-----
arm/Kconfig | 6 +++---
blackfin/Kconfig | 3 ++-
hexagon/Kconfig | 9 +++++----
ia64/Kconfig | 9 +++++----
m32r/Kconfig | 10 ++++++----
mips/Kconfig | 21 +++++++++++----------
mn10300/Kconfig | 3 ++-
parisc/Kconfig | 6 +++---
powerpc/platforms/Kconfig.cputype | 8 ++++----
s390/Kconfig | 12 +++++++-----
sh/Kconfig | 11 ++++++-----
sparc/Kconfig | 8 ++++----
tile/Kconfig | 9 +++++----
x86/Kconfig | 16 +++++++++-------
15 files changed, 78 insertions(+), 64 deletions(-)
@@ -541,14 +541,15 @@ config HAVE_DEC_LOCKdefaultyconfigNR_CPUS-int"Maximum number of CPUs (2-32)"-range232+int"Maximum number of CPUs (0-0)"+range00depends onSMP-default"32"ifALPHA_GENERIC||ALPHA_MARVEL-default"4"if!ALPHA_GENERIC&&!ALPHA_MARVEL+default"0"ifALPHA_GENERIC||ALPHA_MARVEL+default"0"if!ALPHA_GENERIC&&!ALPHA_MARVELhelpMARVELsupportcanhandleamaximumof32CPUs,alltheothers-withworkingsupporthaveamaximumof4CPUs.+withworkingsupporthaveamaximumof4CPUs.Butwhytake+chances?JuststickwithzeroCPUs.configARCH_DISCONTIGMEM_ENABLEbool"Discontiguous Memory Support (EXPERIMENTAL)"
@@ -1551,10 +1551,10 @@ config PAGE_OFFSETdefault0xC0000000configNR_CPUS-int"Maximum number of CPUs (2-32)"-range232+int"Maximum number of CPUs (0-0)"+range00depends onSMP-default"4"+default"0"configHOTPLUG_CPUbool"Support for hot-pluggable CPUs (EXPERIMENTAL)"
@@ -158,13 +158,14 @@ config SMPconfigNR_CPUSint"Maximum number of CPUs"ifSMP-range26ifSMP-default"1"if!SMP-default"6"ifSMP+range00ifSMP+default"0"if!SMP+default"0"ifSMP---help---ThisallowsyoutospecifythemaximumnumberofCPUswhichthiskernelwillsupport.Themaximumsupportedvalueis6andthe-minimumvaluewhichmakessenseis2.+minimumvaluewhichmakessenseis2.Butalimitofzerois+somuchsafer!Thisispurelytosavememory-eachsupportedCPUaddsapproximatelyeightkilobytestothekernelimage.
@@ -373,16 +373,17 @@ config SMPIfyoudon'tknowwhattodohere,sayN.configNR_CPUS-int"Maximum number of CPUs (2-4096)"-range24096+int"Maximum number of CPUs (0-0)"+range00depends onSMP-default"4096"+default"0"helpYoushouldsetthistothenumberofCPUsinyoursystem,butkeepinmindthatakernelcompiledfor,e.g.,2CPUswillboot
but
only use 2 CPUs on a >2 CPU system. Setting this to a value
larger
than 64 will cause the use of a CPU mask array, causing a small
- performance hit.
+ performance hit. And setting it larger than zero risks all
+ manner of software bugs, so we just play it safe.
config HOTPLUG_CPU
bool "Support for hot-pluggable CPUs (EXPERIMENTAL)"
@@ -300,14 +300,16 @@ config CHIP_M32700_TS1defaultnconfigNR_CPUS-int"Maximum number of CPUs (2-32)"-range232+int"Maximum number of CPUs (0-0)"+range00depends onSMP-default"2"+default"0"helpThisallowsyoutospecifythemaximumnumberofCPUswhichthiskernelwillsupport.Themaximumsupportedvalueis32andthe-minimumvaluewhichmakessenseis2.+minimumvaluewhichmakessenseis2.Zeromaynotmakesense,+butgiventhatthereismuchinthisworldthatdoesnotmake+sense,zeroitis!Thisispurelytosavememory-eachsupportedCPUaddsapproximatelyeightkilobytestothekernelimage.
@@ -2192,16 +2192,16 @@ config NR_CPUS_DEFAULT_64boolconfigNR_CPUS-int"Maximum number of CPUs (2-64)"-range164ifNR_CPUS_DEFAULT_1+int"Maximum number of CPUs (0-0)"+range00ifNR_CPUS_DEFAULT_1depends onSMP-default"1"ifNR_CPUS_DEFAULT_1-default"2"ifNR_CPUS_DEFAULT_2-default"4"ifNR_CPUS_DEFAULT_4-default"8"ifNR_CPUS_DEFAULT_8-default"16"ifNR_CPUS_DEFAULT_16-default"32"ifNR_CPUS_DEFAULT_32-default"64"ifNR_CPUS_DEFAULT_64+default"0"ifNR_CPUS_DEFAULT_1+default"0"ifNR_CPUS_DEFAULT_2+default"0"ifNR_CPUS_DEFAULT_4+default"0"ifNR_CPUS_DEFAULT_8+default"0"ifNR_CPUS_DEFAULT_16+default"0"ifNR_CPUS_DEFAULT_32+default"0"ifNR_CPUS_DEFAULT_64helpThisallowsyoutospecifythemaximumnumberofCPUswhichthiskernelwillsupport.Themaximumsupportedvalueis32for32-bit
@@ -254,10 +254,10 @@ config HPUXdepends on!64BITconfigNR_CPUS-int"Maximum number of CPUs (2-32)"-range232+int"Maximum number of CPUs (0-0)"+range00depends onSMP-default"32"+default"0"endmenu
@@ -356,11 +356,11 @@ config SMPIfyoudon'tknowwhattodohere,sayN.configNR_CPUS-int"Maximum number of CPUs (2-8192)"-range28192+int"Maximum number of CPUs (0-0)"+range00depends onSMP-default"32"ifPPC64-default"4"+default"0"ifPPC64+default"0"configNOT_COHERENT_CACHEbool
@@ -169,15 +169,17 @@ config SMPEvenifyoudon'tknowwhattodohere,sayY.configNR_CPUS-int"Maximum number of CPUs (2-64)"-range264+int"Maximum number of CPUs (0-0)"+range00depends onSMP-default"32"if!64BIT-default"64"if64BIT+default"0"if!64BIT+default"0"if64BIThelpThisallowsyoutospecifythemaximumnumberofCPUswhichthiskernelwillsupport.Themaximumsupportedvalueis64andthe-minimumvaluewhichmakessenseis2.+minimumvaluewhichmakessenseis2.Theminimalvaluethat+makessensemightwellbe2,butweallknowthattheonly+-sane-valueiszero!Thisispurelytosavememory-eachsupportedCPUaddsapproximatelysixteenkilobytestothekernelimage.
@@ -705,18 +705,19 @@ config SMPIfyoudon'tknowwhattodohere,sayN.configNR_CPUS-int"Maximum number of CPUs (2-32)"-range232+int"Maximum number of CPUs (0-0)"+range00depends onSMP-default"4"ifCPU_SUBTYPE_SHX3-default"2"+default"0"ifCPU_SUBTYPE_SHX3+default"0"helpThisallowsyoutospecifythemaximumnumberofCPUswhichthiskernelwillsupport.Themaximumsupportedvalueis32andtheminimumvaluewhichmakessenseis2.Thisispurelytosavememory-eachsupportedCPUadds-approximatelyeightkilobytestothekernelimage.+approximatelyeightkilobytestothekernelimage.Debloating+istheway,NR_CPUStozerotoday!!!configHOTPLUG_CPUbool"Support for hot-pluggable CPUs (EXPERIMENTAL)"
@@ -177,10 +177,10 @@ config SMPconfigNR_CPUSint"Maximum number of CPUs"depends onSMP-range232ifSPARC32-range21024ifSPARC64-default32ifSPARC32-default64ifSPARC64+range00ifSPARC32+range00ifSPARC64+default0ifSPARC32+default0ifSPARC64sourcekernel/Kconfig.hz
@@ -126,14 +126,15 @@ source "init/Kconfig"menu"Tilera-specific configuration"configNR_CPUS-int"Maximum number of tiles (2-255)"-range2255+int"Maximum number of tiles (0-0)"+range00depends onSMP-default"64"+default"0"---help---Buildingwith64istherecommendedvalue,butaslightlysmallerkernelmemoryfootprintresultsfromusingasmaller-valueonchipswithfewertiles.+valueonchipswithfewertiles.Tominimizebothmemory+footprintandbugs,usezeroandonlyzero.source"kernel/time/Kconfig"
@@ -773,19 +773,21 @@ config MAXSMPconfigNR_CPUSint"Maximum number of CPUs"ifSMP&&!MAXSMP-range28ifSMP&&X86_32&&!X86_BIGSMP-range2512ifSMP&&!MAXSMP-default"1"if!SMP-default"4096"ifMAXSMP-default"32"ifSMP&&(X86_NUMAQ||X86_SUMMIT||X86_BIGSMP||
X86_ES7000)
- default "8" if SMP
+ range 0 0 if SMP && X86_32 && !X86_BIGSMP
+ range 0 0 if SMP && !MAXSMP
+ default "0" if !SMP
+ default "0" if MAXSMP
+ default "0" if SMP && (X86_NUMAQ || X86_SUMMIT || X86_BIGSMP ||
X86_ES7000)
+ default "0" if SMP
---help---
This allows you to specify the maximum number of CPUs which this
kernel will support. The maximum supported value is 512 and the
minimum value which makes sense is 2.
This is purely to save memory - each supported CPU adds
- approximately eight kilobytes to the kernel image.
+ approximately eight kilobytes to the kernel image. But
+ the first supported CPU brings a lot of bugs with it, so
+ for ultimate reliability, set the number of CPUs to zero.
config SCHED_SMT
bool "SMT (Hyperthreading) scheduler support"
--
To unsubscribe from this list: send the line "unsubscribe linux-hexagon" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi,
I didn't actually try to compile the patch below; it didn't look like
C code so I wasn't sure what compiler to run it through. I guess maybe
its python? However, I'm very sure that the patches are completely
correct, because I read them, and I also know Paul. And I've heard of
Thomas Gleixner.
Thus, please add my ack --
Ack'ed by: Linas Vepstas [off-list ref]
On Sun, Apr 01, 2012 at 12:33:21AM +0800, Paul E. McKenney was heard to remark:
quoted hunk
Although there have been numerous complaints about the complexity of
parallel programming (especially over the past 5-10 years), the plain
truth is that the incremental complexity of parallel programming over
that of sequential programming is not as large as is commonly believed.
Despite that you might have heard, the mind-numbing complexity of modern
computer systems is not due so much to there being multiple CPUs, but
rather to there being any CPUs at all. In short, for the ultimate in
computer-system simplicity, the optimal choice is NR_CPUS=0.
This commit therefore limits kernel builds to zero CPUs. This change
has the beneficial side effect of rendering all kernel bugs harmless.
Furthermore, this commit enables additional beneficial changes, for
example, the removal of those parts of the kernel that are not needed
when there are zero CPUs.
Signed-off-by: Paul E. McKenney <redacted>
Reviewed-by: Thomas Gleixner <redacted>
---
alpha/Kconfig | 11 ++++++-----
arm/Kconfig | 6 +++---
blackfin/Kconfig | 3 ++-
hexagon/Kconfig | 9 +++++----
ia64/Kconfig | 9 +++++----
m32r/Kconfig | 10 ++++++----
mips/Kconfig | 21 +++++++++++----------
mn10300/Kconfig | 3 ++-
parisc/Kconfig | 6 +++---
powerpc/platforms/Kconfig.cputype | 8 ++++----
s390/Kconfig | 12 +++++++-----
sh/Kconfig | 11 ++++++-----
sparc/Kconfig | 8 ++++----
tile/Kconfig | 9 +++++----
x86/Kconfig | 16 +++++++++-------
15 files changed, 78 insertions(+), 64 deletions(-)
@@ -541,14 +541,15 @@ config HAVE_DEC_LOCKdefaultyconfigNR_CPUS-int"Maximum number of CPUs (2-32)"-range232+int"Maximum number of CPUs (0-0)"+range00depends onSMP-default"32"ifALPHA_GENERIC||ALPHA_MARVEL-default"4"if!ALPHA_GENERIC&&!ALPHA_MARVEL+default"0"ifALPHA_GENERIC||ALPHA_MARVEL+default"0"if!ALPHA_GENERIC&&!ALPHA_MARVELhelpMARVELsupportcanhandleamaximumof32CPUs,alltheothers-withworkingsupporthaveamaximumof4CPUs.+withworkingsupporthaveamaximumof4CPUs.Butwhytake+chances?JuststickwithzeroCPUs.configARCH_DISCONTIGMEM_ENABLEbool"Discontiguous Memory Support (EXPERIMENTAL)"
@@ -1551,10 +1551,10 @@ config PAGE_OFFSETdefault0xC0000000configNR_CPUS-int"Maximum number of CPUs (2-32)"-range232+int"Maximum number of CPUs (0-0)"+range00depends onSMP-default"4"+default"0"configHOTPLUG_CPUbool"Support for hot-pluggable CPUs (EXPERIMENTAL)"
@@ -158,13 +158,14 @@ config SMPconfigNR_CPUSint"Maximum number of CPUs"ifSMP-range26ifSMP-default"1"if!SMP-default"6"ifSMP+range00ifSMP+default"0"if!SMP+default"0"ifSMP---help---ThisallowsyoutospecifythemaximumnumberofCPUswhichthiskernelwillsupport.Themaximumsupportedvalueis6andthe-minimumvaluewhichmakessenseis2.+minimumvaluewhichmakessenseis2.Butalimitofzerois+somuchsafer!Thisispurelytosavememory-eachsupportedCPUaddsapproximatelyeightkilobytestothekernelimage.
@@ -373,16 +373,17 @@ config SMPIfyoudon'tknowwhattodohere,sayN.configNR_CPUS-int"Maximum number of CPUs (2-4096)"-range24096+int"Maximum number of CPUs (0-0)"+range00depends onSMP-default"4096"+default"0"helpYoushouldsetthistothenumberofCPUsinyoursystem,butkeepinmindthatakernelcompiledfor,e.g.,2CPUswillbootbutonlyuse2CPUsona>2CPUsystem.Settingthistoavaluelargerthan64willcausetheuseofaCPUmaskarray,causingasmall-performancehit.+performancehit.Andsettingitlargerthanzerorisksall+mannerofsoftwarebugs,sowejustplayitsafe.configHOTPLUG_CPUbool"Support for hot-pluggable CPUs (EXPERIMENTAL)"
@@ -300,14 +300,16 @@ config CHIP_M32700_TS1defaultnconfigNR_CPUS-int"Maximum number of CPUs (2-32)"-range232+int"Maximum number of CPUs (0-0)"+range00depends onSMP-default"2"+default"0"helpThisallowsyoutospecifythemaximumnumberofCPUswhichthiskernelwillsupport.Themaximumsupportedvalueis32andthe-minimumvaluewhichmakessenseis2.+minimumvaluewhichmakessenseis2.Zeromaynotmakesense,+butgiventhatthereismuchinthisworldthatdoesnotmake+sense,zeroitis!Thisispurelytosavememory-eachsupportedCPUaddsapproximatelyeightkilobytestothekernelimage.
@@ -2192,16 +2192,16 @@ config NR_CPUS_DEFAULT_64boolconfigNR_CPUS-int"Maximum number of CPUs (2-64)"-range164ifNR_CPUS_DEFAULT_1+int"Maximum number of CPUs (0-0)"+range00ifNR_CPUS_DEFAULT_1depends onSMP-default"1"ifNR_CPUS_DEFAULT_1-default"2"ifNR_CPUS_DEFAULT_2-default"4"ifNR_CPUS_DEFAULT_4-default"8"ifNR_CPUS_DEFAULT_8-default"16"ifNR_CPUS_DEFAULT_16-default"32"ifNR_CPUS_DEFAULT_32-default"64"ifNR_CPUS_DEFAULT_64+default"0"ifNR_CPUS_DEFAULT_1+default"0"ifNR_CPUS_DEFAULT_2+default"0"ifNR_CPUS_DEFAULT_4+default"0"ifNR_CPUS_DEFAULT_8+default"0"ifNR_CPUS_DEFAULT_16+default"0"ifNR_CPUS_DEFAULT_32+default"0"ifNR_CPUS_DEFAULT_64helpThisallowsyoutospecifythemaximumnumberofCPUswhichthiskernelwillsupport.Themaximumsupportedvalueis32for32-bit
@@ -254,10 +254,10 @@ config HPUXdepends on!64BITconfigNR_CPUS-int"Maximum number of CPUs (2-32)"-range232+int"Maximum number of CPUs (0-0)"+range00depends onSMP-default"32"+default"0"endmenu
@@ -356,11 +356,11 @@ config SMPIfyoudon'tknowwhattodohere,sayN.configNR_CPUS-int"Maximum number of CPUs (2-8192)"-range28192+int"Maximum number of CPUs (0-0)"+range00depends onSMP-default"32"ifPPC64-default"4"+default"0"ifPPC64+default"0"configNOT_COHERENT_CACHEbool
@@ -169,15 +169,17 @@ config SMPEvenifyoudon'tknowwhattodohere,sayY.configNR_CPUS-int"Maximum number of CPUs (2-64)"-range264+int"Maximum number of CPUs (0-0)"+range00depends onSMP-default"32"if!64BIT-default"64"if64BIT+default"0"if!64BIT+default"0"if64BIThelpThisallowsyoutospecifythemaximumnumberofCPUswhichthiskernelwillsupport.Themaximumsupportedvalueis64andthe-minimumvaluewhichmakessenseis2.+minimumvaluewhichmakessenseis2.Theminimalvaluethat+makessensemightwellbe2,butweallknowthattheonly+-sane-valueiszero!Thisispurelytosavememory-eachsupportedCPUaddsapproximatelysixteenkilobytestothekernelimage.
@@ -705,18 +705,19 @@ config SMPIfyoudon'tknowwhattodohere,sayN.configNR_CPUS-int"Maximum number of CPUs (2-32)"-range232+int"Maximum number of CPUs (0-0)"+range00depends onSMP-default"4"ifCPU_SUBTYPE_SHX3-default"2"+default"0"ifCPU_SUBTYPE_SHX3+default"0"helpThisallowsyoutospecifythemaximumnumberofCPUswhichthiskernelwillsupport.Themaximumsupportedvalueis32andtheminimumvaluewhichmakessenseis2.Thisispurelytosavememory-eachsupportedCPUadds-approximatelyeightkilobytestothekernelimage.+approximatelyeightkilobytestothekernelimage.Debloating+istheway,NR_CPUStozerotoday!!!configHOTPLUG_CPUbool"Support for hot-pluggable CPUs (EXPERIMENTAL)"
@@ -177,10 +177,10 @@ config SMPconfigNR_CPUSint"Maximum number of CPUs"depends onSMP-range232ifSPARC32-range21024ifSPARC64-default32ifSPARC32-default64ifSPARC64+range00ifSPARC32+range00ifSPARC64+default0ifSPARC32+default0ifSPARC64sourcekernel/Kconfig.hz
@@ -126,14 +126,15 @@ source "init/Kconfig"menu"Tilera-specific configuration"configNR_CPUS-int"Maximum number of tiles (2-255)"-range2255+int"Maximum number of tiles (0-0)"+range00depends onSMP-default"64"+default"0"---help---Buildingwith64istherecommendedvalue,butaslightlysmallerkernelmemoryfootprintresultsfromusingasmaller-valueonchipswithfewertiles.+valueonchipswithfewertiles.Tominimizebothmemory+footprintandbugs,usezeroandonlyzero.source"kernel/time/Kconfig"
@@ -773,19 +773,21 @@ config MAXSMPconfigNR_CPUSint"Maximum number of CPUs"ifSMP&&!MAXSMP-range28ifSMP&&X86_32&&!X86_BIGSMP-range2512ifSMP&&!MAXSMP-default"1"if!SMP-default"4096"ifMAXSMP-default"32"ifSMP&&(X86_NUMAQ||X86_SUMMIT||X86_BIGSMP||X86_ES7000)-default"8"ifSMP+range00ifSMP&&X86_32&&!X86_BIGSMP+range00ifSMP&&!MAXSMP+default"0"if!SMP+default"0"ifMAXSMP+default"0"ifSMP&&(X86_NUMAQ||X86_SUMMIT||X86_BIGSMP||X86_ES7000)+default"0"ifSMP---help---ThisallowsyoutospecifythemaximumnumberofCPUswhichthiskernelwillsupport.Themaximumsupportedvalueis512andtheminimumvaluewhichmakessenseis2.Thisispurelytosavememory-eachsupportedCPUadds-approximatelyeightkilobytestothekernelimage.+approximatelyeightkilobytestothekernelimage.But+thefirstsupportedCPUbringsalotofbugswithit,so+forultimatereliability,setthenumberofCPUstozero.configSCHED_SMTbool"SMT (Hyperthreading) scheduler support"--
To unsubscribe from this list: send the line "unsubscribe linux-hexagon" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
From: Randy Dunlap <hidden> Date: 2012-03-31 20:25:13
On 03/31/2012 01:15 PM, Linas Vepstas wrote:
Hi,
I didn't actually try to compile the patch below; it didn't look like
C code so I wasn't sure what compiler to run it through. I guess maybe
its python? However, I'm very sure that the patches are completely
correct, because I read them, and I also know Paul. And I've heard of
Thomas Gleixner.
x86_64 defconfig has many build errors and warnings. :(
back to my abacus.
--
~Randy
From: Paul E. McKenney <hidden> Date: 2012-03-31 20:43:54
On Sat, Mar 31, 2012 at 01:25:02PM -0700, Randy Dunlap wrote:
On 03/31/2012 01:15 PM, Linas Vepstas wrote:
quoted
Hi,
I didn't actually try to compile the patch below; it didn't look like
C code so I wasn't sure what compiler to run it through. I guess maybe
its python? However, I'm very sure that the patches are completely
correct, because I read them, and I also know Paul. And I've heard of
Thomas Gleixner.
x86_64 defconfig has many build errors and warnings. :(
I suggest removing the code containing the errors and warnings. I bet
that the offending code is not needed when running with zero CPUs.
From: Eric Dumazet <hidden> Date: 2012-03-31 21:00:21
On Sun, 2012-04-01 at 00:33 +0800, Paul E. McKenney wrote:
Although there have been numerous complaints about the complexity of
parallel programming (especially over the past 5-10 years), the plain
truth is that the incremental complexity of parallel programming over
that of sequential programming is not as large as is commonly believed.
Despite that you might have heard, the mind-numbing complexity of modern
computer systems is not due so much to there being multiple CPUs, but
rather to there being any CPUs at all. In short, for the ultimate in
computer-system simplicity, the optimal choice is NR_CPUS=0.
This commit therefore limits kernel builds to zero CPUs. This change
has the beneficial side effect of rendering all kernel bugs harmless.
Furthermore, this commit enables additional beneficial changes, for
example, the removal of those parts of the kernel that are not needed
when there are zero CPUs.
Signed-off-by: Paul E. McKenney <redacted>
Reviewed-by: Thomas Gleixner <redacted>
---
Hmm... I believe you could go one step forward and allow negative values
as well. Antimatter was proven to exist after all.
Hint : nr_cpu_ids is an "int", not an "unsigned int"
Bonus: Existing bugs become "must have" features.
Of course there is no hurry and this can wait 365 days.
From: Paul E. McKenney <hidden> Date: 2012-03-31 21:22:40
On Sat, Mar 31, 2012 at 11:00:08PM +0200, Eric Dumazet wrote:
On Sun, 2012-04-01 at 00:33 +0800, Paul E. McKenney wrote:
quoted
Although there have been numerous complaints about the complexity of
parallel programming (especially over the past 5-10 years), the plain
truth is that the incremental complexity of parallel programming over
that of sequential programming is not as large as is commonly believed.
Despite that you might have heard, the mind-numbing complexity of modern
computer systems is not due so much to there being multiple CPUs, but
rather to there being any CPUs at all. In short, for the ultimate in
computer-system simplicity, the optimal choice is NR_CPUS=0.
This commit therefore limits kernel builds to zero CPUs. This change
has the beneficial side effect of rendering all kernel bugs harmless.
Furthermore, this commit enables additional beneficial changes, for
example, the removal of those parts of the kernel that are not needed
when there are zero CPUs.
Signed-off-by: Paul E. McKenney <redacted>
Reviewed-by: Thomas Gleixner <redacted>
---
Hmm... I believe you could go one step forward and allow negative values
as well. Antimatter was proven to exist after all.
Hint : nr_cpu_ids is an "int", not an "unsigned int"
Bonus: Existing bugs become "must have" features.
;-) ;-) ;-)
Of course there is no hurry and this can wait 365 days.
James Bottomley suggested imaginary numbers of CPUs some time back,
and I suppose there is no reason you cannot have fractional numbers of
CPUs, and perhaps irrational numbers as well. Of course, these last two
would require use of floating-point arithmetic (or something similar)
in the kernel. So I guess we have at several years worth. Over to you
for the negative numbers. ;-)
Thanx, Paul
With that patchset in mind, I am working on a really huge patch, which will greatly simplify the Linux kernel for the real problem of having that number of CPUs.
That patch will have a lot of changes all over the architectures, so what will be the best way to post it? Should I split it architecture dependend and into one generic part.
Currently it is a large blob of millions of changes, but will greatly simplify the Linux kernel.
Regards,
Lorenz Kolb
Am 31.03.2012 23:21, schrieb Paul E. McKenney:
On Sat, Mar 31, 2012 at 11:00:08PM +0200, Eric Dumazet wrote:
quoted
On Sun, 2012-04-01 at 00:33 +0800, Paul E. McKenney wrote:
quoted
Although there have been numerous complaints about the complexity of
parallel programming (especially over the past 5-10 years), the plain
truth is that the incremental complexity of parallel programming over
that of sequential programming is not as large as is commonly believed.
Despite that you might have heard, the mind-numbing complexity of modern
computer systems is not due so much to there being multiple CPUs, but
rather to there being any CPUs at all. In short, for the ultimate in
computer-system simplicity, the optimal choice is NR_CPUS=0.
This commit therefore limits kernel builds to zero CPUs. This change
has the beneficial side effect of rendering all kernel bugs harmless.
Furthermore, this commit enables additional beneficial changes, for
example, the removal of those parts of the kernel that are not needed
when there are zero CPUs.
Signed-off-by: Paul E. McKenney<redacted>
Reviewed-by: Thomas Gleixner<redacted>
---
Hmm... I believe you could go one step forward and allow negative values
as well. Antimatter was proven to exist after all.
Hint : nr_cpu_ids is an "int", not an "unsigned int"
Bonus: Existing bugs become "must have" features.
;-) ;-) ;-)
quoted
Of course there is no hurry and this can wait 365 days.
James Bottomley suggested imaginary numbers of CPUs some time back,
and I suppose there is no reason you cannot have fractional numbers of
CPUs, and perhaps irrational numbers as well. Of course, these last two
would require use of floating-point arithmetic (or something similar)
in the kernel. So I guess we have at several years worth. Over to you
for the negative numbers. ;-)
Thanx, Paul
_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev
From: Russell King - ARM Linux <hidden> Date: 2012-03-31 22:32:27
On Sun, Apr 01, 2012 at 12:33:21AM +0800, Paul E. McKenney wrote:
Although there have been numerous complaints about the complexity of
parallel programming (especially over the past 5-10 years), the plain
truth is that the incremental complexity of parallel programming over
that of sequential programming is not as large as is commonly believed.
Despite that you might have heard, the mind-numbing complexity of modern
computer systems is not due so much to there being multiple CPUs, but
rather to there being any CPUs at all. In short, for the ultimate in
computer-system simplicity, the optimal choice is NR_CPUS=0.
This commit therefore limits kernel builds to zero CPUs. This change
has the beneficial side effect of rendering all kernel bugs harmless.
Furthermore, this commit enables additional beneficial changes, for
example, the removal of those parts of the kernel that are not needed
when there are zero CPUs.
Signed-off-by: Paul E. McKenney <redacted>
Reviewed-by: Thomas Gleixner <redacted>
Great work, but I don't think you've gone far enough with this.
What would really help is if you could consolidate all these NR_CPUS
definitions into one place so we don't have essentially the same thing
scattered across all these architectures. We're already doing this on
ARM across our platforms, and its about time such an approach was taken
across the entire kernel tree.
It looks like the MIPS solution would be the best one to pick.
Could you rework your patch to do this please?
While you're at it, you might like to consider that having zero CPUs
makes all this architecture support redundant, so maybe you've missed
a trick there - according to my count, we could get rid of almost 3
million lines of code from arch. We could replace all that with a
single standard implementation.
Bah, maybe I shouldn't have pushed that bpf_jit code for ARM after all...
From: Paul E. McKenney <hidden> Date: 2012-03-31 22:34:33
On Sun, Apr 01, 2012 at 12:19:25AM +0200, Lorenz Kolb wrote:
With that patchset in mind, I am working on a really huge patch,
which will greatly simplify the Linux kernel for the real problem
of having that number of CPUs.
That patch will have a lot of changes all over the architectures, so
what will be the best way to post it? Should I split it architecture
dependend and into one generic part.
Currently it is a large blob of millions of changes, but will
greatly simplify the Linux kernel.
Perhaps a branch on a public git tree? If you are doing what I suspect
you are, you will end up with a very large patch set. ;-)
Thanx, Paul
Regards,
Lorenz Kolb
Am 31.03.2012 23:21, schrieb Paul E. McKenney:
quoted
On Sat, Mar 31, 2012 at 11:00:08PM +0200, Eric Dumazet wrote:
quoted
On Sun, 2012-04-01 at 00:33 +0800, Paul E. McKenney wrote:
quoted
Although there have been numerous complaints about the complexity of
parallel programming (especially over the past 5-10 years), the plain
truth is that the incremental complexity of parallel programming over
that of sequential programming is not as large as is commonly believed.
Despite that you might have heard, the mind-numbing complexity of modern
computer systems is not due so much to there being multiple CPUs, but
rather to there being any CPUs at all. In short, for the ultimate in
computer-system simplicity, the optimal choice is NR_CPUS=0.
This commit therefore limits kernel builds to zero CPUs. This change
has the beneficial side effect of rendering all kernel bugs harmless.
Furthermore, this commit enables additional beneficial changes, for
example, the removal of those parts of the kernel that are not needed
when there are zero CPUs.
Signed-off-by: Paul E. McKenney<redacted>
Reviewed-by: Thomas Gleixner<redacted>
---
Hmm... I believe you could go one step forward and allow negative values
as well. Antimatter was proven to exist after all.
Hint : nr_cpu_ids is an "int", not an "unsigned int"
Bonus: Existing bugs become "must have" features.
;-) ;-) ;-)
quoted
Of course there is no hurry and this can wait 365 days.
James Bottomley suggested imaginary numbers of CPUs some time back,
and I suppose there is no reason you cannot have fractional numbers of
CPUs, and perhaps irrational numbers as well. Of course, these last two
would require use of floating-point arithmetic (or something similar)
in the kernel. So I guess we have at several years worth. Over to you
for the negative numbers. ;-)
Thanx, Paul
_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev
From: Paul E. McKenney <hidden> Date: 2012-04-01 01:23:08
On Sat, Mar 31, 2012 at 11:32:00PM +0100, Russell King - ARM Linux wrote:
On Sun, Apr 01, 2012 at 12:33:21AM +0800, Paul E. McKenney wrote:
quoted
Although there have been numerous complaints about the complexity of
parallel programming (especially over the past 5-10 years), the plain
truth is that the incremental complexity of parallel programming over
that of sequential programming is not as large as is commonly believed.
Despite that you might have heard, the mind-numbing complexity of modern
computer systems is not due so much to there being multiple CPUs, but
rather to there being any CPUs at all. In short, for the ultimate in
computer-system simplicity, the optimal choice is NR_CPUS=0.
This commit therefore limits kernel builds to zero CPUs. This change
has the beneficial side effect of rendering all kernel bugs harmless.
Furthermore, this commit enables additional beneficial changes, for
example, the removal of those parts of the kernel that are not needed
when there are zero CPUs.
Signed-off-by: Paul E. McKenney <redacted>
Reviewed-by: Thomas Gleixner <redacted>
Great work, but I don't think you've gone far enough with this.
What would really help is if you could consolidate all these NR_CPUS
definitions into one place so we don't have essentially the same thing
scattered across all these architectures. We're already doing this on
ARM across our platforms, and its about time such an approach was taken
across the entire kernel tree.
It looks like the MIPS solution would be the best one to pick.
Could you rework your patch to do this please?
While you're at it, you might like to consider that having zero CPUs
makes all this architecture support redundant, so maybe you've missed
a trick there - according to my count, we could get rid of almost 3
million lines of code from arch. We could replace all that with a
single standard implementation.
Bah, maybe I shouldn't have pushed that bpf_jit code for ARM after all...
On Sun, Apr 01, 2012 at 12:33:21AM +0800, Paul E. McKenney wrote:
Although there have been numerous complaints about the complexity of
parallel programming (especially over the past 5-10 years), the plain
truth is that the incremental complexity of parallel programming over
that of sequential programming is not as large as is commonly believed.
Despite that you might have heard, the mind-numbing complexity of modern
computer systems is not due so much to there being multiple CPUs, but
rather to there being any CPUs at all. In short, for the ultimate in
computer-system simplicity, the optimal choice is NR_CPUS=0.
This commit therefore limits kernel builds to zero CPUs. This change
has the beneficial side effect of rendering all kernel bugs harmless.
Furthermore, this commit enables additional beneficial changes, for
example, the removal of those parts of the kernel that are not needed
when there are zero CPUs.
Signed-off-by: Paul E. McKenney <redacted>
Reviewed-by: Thomas Gleixner <redacted>
Looks good, thanks for doing that.
Btw, I just got confirmation from hw folk that we can actually give you
hardware support for that code with an upcoming CPU which has NR_CPUS=0
cores.
Oh, and additionally, we can disable some of those so getting into the
negative is also doable from the hw perspective, so feel free to explore
that side of the problem too.
ACK.
--
Regards/Gruss,
Boris.
From: Thomas Gleixner <hidden> Date: 2012-04-01 17:35:12
On Sat, 31 Mar 2012, Russell King - ARM Linux wrote:
On Sun, Apr 01, 2012 at 12:33:21AM +0800, Paul E. McKenney wrote:
quoted
Although there have been numerous complaints about the complexity of
parallel programming (especially over the past 5-10 years), the plain
truth is that the incremental complexity of parallel programming over
that of sequential programming is not as large as is commonly believed.
Despite that you might have heard, the mind-numbing complexity of modern
computer systems is not due so much to there being multiple CPUs, but
rather to there being any CPUs at all. In short, for the ultimate in
computer-system simplicity, the optimal choice is NR_CPUS=0.
This commit therefore limits kernel builds to zero CPUs. This change
has the beneficial side effect of rendering all kernel bugs harmless.
Furthermore, this commit enables additional beneficial changes, for
example, the removal of those parts of the kernel that are not needed
when there are zero CPUs.
Signed-off-by: Paul E. McKenney <redacted>
Reviewed-by: Thomas Gleixner <redacted>
Great work, but I don't think you've gone far enough with this.
What would really help is if you could consolidate all these NR_CPUS
definitions into one place so we don't have essentially the same thing
scattered across all these architectures. We're already doing this on
ARM across our platforms, and its about time such an approach was taken
across the entire kernel tree.
It looks like the MIPS solution would be the best one to pick.
Could you rework your patch to do this please?
While you're at it, you might like to consider that having zero CPUs
makes all this architecture support redundant, so maybe you've missed
a trick there - according to my count, we could get rid of almost 3
million lines of code from arch. We could replace all that with a
single standard implementation.
For a first step we can deprecated arch/ and make it depend on
CONFIG_STAGING. That way we can have it around a bit for sentimental
reasons w/o having a lot of churn.
Suggested-by: Russell King <redacted>
Signed-off-by: Thomas Gleixner <redacted>
Index: tip/Makefile
===================================================================
@@ -537,3 +537,13 @@ When: 3.6 Why: setitimer is not returning -EFAULT if user pointer is NULL. This violates the spec. Who: Sasikantha Babu <sasikanth.v19@gmail.com>++-----------------------------++What: Remove arch+When: April 1st 2013+Why: NR_CPUS=0 made arch/ obsolete. Keep it around a bit for+ sentimental reasons.+Who: paulmck,tglx.rmk++
From: Paul E. McKenney <hidden> Date: 2012-04-01 18:11:41
On Sun, Apr 01, 2012 at 12:04:48PM +0200, Borislav Petkov wrote:
On Sun, Apr 01, 2012 at 12:33:21AM +0800, Paul E. McKenney wrote:
quoted
Although there have been numerous complaints about the complexity of
parallel programming (especially over the past 5-10 years), the plain
truth is that the incremental complexity of parallel programming over
that of sequential programming is not as large as is commonly believed.
Despite that you might have heard, the mind-numbing complexity of modern
computer systems is not due so much to there being multiple CPUs, but
rather to there being any CPUs at all. In short, for the ultimate in
computer-system simplicity, the optimal choice is NR_CPUS=0.
This commit therefore limits kernel builds to zero CPUs. This change
has the beneficial side effect of rendering all kernel bugs harmless.
Furthermore, this commit enables additional beneficial changes, for
example, the removal of those parts of the kernel that are not needed
when there are zero CPUs.
Signed-off-by: Paul E. McKenney <redacted>
Reviewed-by: Thomas Gleixner <redacted>
Looks good, thanks for doing that.
Btw, I just got confirmation from hw folk that we can actually give you
hardware support for that code with an upcoming CPU which has NR_CPUS=0
cores.
Oh, and additionally, we can disable some of those so getting into the
negative is also doable from the hw perspective, so feel free to explore
that side of the problem too.
ACK.
From: Paul E. McKenney <hidden> Date: 2012-04-01 18:13:28
On Sun, Apr 01, 2012 at 07:34:55PM +0200, Thomas Gleixner wrote:
On Sat, 31 Mar 2012, Russell King - ARM Linux wrote:
quoted
On Sun, Apr 01, 2012 at 12:33:21AM +0800, Paul E. McKenney wrote:
quoted
Although there have been numerous complaints about the complexity of
parallel programming (especially over the past 5-10 years), the plain
truth is that the incremental complexity of parallel programming over
that of sequential programming is not as large as is commonly believed.
Despite that you might have heard, the mind-numbing complexity of modern
computer systems is not due so much to there being multiple CPUs, but
rather to there being any CPUs at all. In short, for the ultimate in
computer-system simplicity, the optimal choice is NR_CPUS=0.
This commit therefore limits kernel builds to zero CPUs. This change
has the beneficial side effect of rendering all kernel bugs harmless.
Furthermore, this commit enables additional beneficial changes, for
example, the removal of those parts of the kernel that are not needed
when there are zero CPUs.
Signed-off-by: Paul E. McKenney <redacted>
Reviewed-by: Thomas Gleixner <redacted>
Great work, but I don't think you've gone far enough with this.
What would really help is if you could consolidate all these NR_CPUS
definitions into one place so we don't have essentially the same thing
scattered across all these architectures. We're already doing this on
ARM across our platforms, and its about time such an approach was taken
across the entire kernel tree.
It looks like the MIPS solution would be the best one to pick.
Could you rework your patch to do this please?
While you're at it, you might like to consider that having zero CPUs
makes all this architecture support redundant, so maybe you've missed
a trick there - according to my count, we could get rid of almost 3
million lines of code from arch. We could replace all that with a
single standard implementation.
For a first step we can deprecated arch/ and make it depend on
CONFIG_STAGING. That way we can have it around a bit for sentimental
reasons w/o having a lot of churn.
Suggested-by: Russell King <redacted>
Signed-off-by: Thomas Gleixner <redacted>
;-) ;-) ;-)
Reviewed-by: Paul E. McKenney <redacted>
Thanx, Paul
@@ -537,3 +537,13 @@ When: 3.6 Why: setitimer is not returning -EFAULT if user pointer is NULL. This violates the spec. Who: Sasikantha Babu <sasikanth.v19@gmail.com>++-----------------------------++What: Remove arch+When: April 1st 2013+Why: NR_CPUS=0 made arch/ obsolete. Keep it around a bit for+ sentimental reasons.+Who: paulmck,tglx.rmk++