* [RFC PATCH 1/3] powerpc: Allow platforms to force-enable CONFIG_SMP
@ 2017-04-05 2:44 Michael Ellerman
2017-04-05 2:44 ` [RFC PATCH 2/3] powerpc/powernv: Always enable SMP when building powernv Michael Ellerman
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Michael Ellerman @ 2017-04-05 2:44 UTC (permalink / raw)
To: linuxppc-dev
Of the 64-bit Book3S platforms, only powermac supports booting on an
actual non-SMP system. The other platforms can be built with SMP
disabled, but it doesn't make a lot of sense given the CPUs they support
are all multicore or multithreaded.
So give platforms the option of forcing SMP=y.
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
arch/powerpc/platforms/Kconfig.cputype | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/platforms/Kconfig.cputype
index 99b0ae8acb78..5c011e4baf0b 100644
--- a/arch/powerpc/platforms/Kconfig.cputype
+++ b/arch/powerpc/platforms/Kconfig.cputype
@@ -371,9 +371,15 @@ config PPC_PERF_CTRS
help
This enables the powerpc-specific perf_event back-end.
+config FORCE_SMP
+ # Allow platforms to force SMP=y by selecting this
+ bool
+ default n
+ select SMP
+
config SMP
depends on PPC_BOOK3S || PPC_BOOK3E || FSL_BOOKE || PPC_47x
- bool "Symmetric multi-processing support"
+ bool "Symmetric multi-processing support" if !FORCE_SMP
---help---
This enables support for systems with more than one CPU. If you have
a system with only one CPU, say N. If you have a system with more
--
2.7.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [RFC PATCH 2/3] powerpc/powernv: Always enable SMP when building powernv
2017-04-05 2:44 [RFC PATCH 1/3] powerpc: Allow platforms to force-enable CONFIG_SMP Michael Ellerman
@ 2017-04-05 2:44 ` Michael Ellerman
2017-04-05 2:44 ` [RFC PATCH 3/3] powerpc/pseries: Always enable SMP when building pseries Michael Ellerman
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Michael Ellerman @ 2017-04-05 2:44 UTC (permalink / raw)
To: linuxppc-dev
The powernv platform supports Power7 and later CPUs, all of which are
multithreaded and multicore.
As such we never build a SMP=n kernel for those machines, other than
possibly for debugging or running in a simulator.
In the debugging case we can get a similar effect by booting with
nr_cpus=1, or there's always the option of building a custom kernel with
SMP hacked out.
For running in simulators the code size reduction from building without
SMP is not particularly important, what matters is the number of
instructions executed. A quick test shows that a SMP=y kernel takes ~6%
more instructions to boot to a shell. Booting with nr_cpus=1 recovers
about half that deficit.
On the flip side, keeping the SMP=n kernel building can be a pain at
times. And although we've mostly kept it building in recent years, no
one is regularly testing that the SMP=n kernel actually boots and works
well on these machines.
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
arch/powerpc/platforms/powernv/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/powerpc/platforms/powernv/Kconfig b/arch/powerpc/platforms/powernv/Kconfig
index 3a07e4dcf97c..bd8d41d3a1b3 100644
--- a/arch/powerpc/platforms/powernv/Kconfig
+++ b/arch/powerpc/platforms/powernv/Kconfig
@@ -19,6 +19,7 @@ config PPC_POWERNV
select CPU_FREQ_GOV_ONDEMAND
select CPU_FREQ_GOV_CONSERVATIVE
select PPC_DOORBELL
+ select FORCE_SMP
default y
config OPAL_PRD
--
2.7.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [RFC PATCH 3/3] powerpc/pseries: Always enable SMP when building pseries
2017-04-05 2:44 [RFC PATCH 1/3] powerpc: Allow platforms to force-enable CONFIG_SMP Michael Ellerman
2017-04-05 2:44 ` [RFC PATCH 2/3] powerpc/powernv: Always enable SMP when building powernv Michael Ellerman
@ 2017-04-05 2:44 ` Michael Ellerman
2017-04-13 13:40 ` [RFC PATCH 1/3] powerpc: Allow platforms to force-enable CONFIG_SMP Michael Ellerman
2017-04-19 3:47 ` [RFC,1/3] " Michael Ellerman
3 siblings, 0 replies; 5+ messages in thread
From: Michael Ellerman @ 2017-04-05 2:44 UTC (permalink / raw)
To: linuxppc-dev
The pseries platform supports Power4 and later CPUs, all of which are
multithreaded and/or multicore.
In practice no one ever builds a SMP=n kernel for these machines. So as
we did for powernv, have the pseries platform imply SMP=y.
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
arch/powerpc/platforms/pseries/Kconfig | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/platforms/pseries/Kconfig b/arch/powerpc/platforms/pseries/Kconfig
index 30ec04f1c67c..913c54e23eea 100644
--- a/arch/powerpc/platforms/pseries/Kconfig
+++ b/arch/powerpc/platforms/pseries/Kconfig
@@ -17,9 +17,10 @@ config PPC_PSERIES
select PPC_UDBG_16550
select PPC_NATIVE
select PPC_DOORBELL
- select HOTPLUG_CPU if SMP
+ select HOTPLUG_CPU
select ARCH_RANDOM
select PPC_DOORBELL
+ select FORCE_SMP
default y
config PPC_SPLPAR
--
2.7.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [RFC PATCH 1/3] powerpc: Allow platforms to force-enable CONFIG_SMP
2017-04-05 2:44 [RFC PATCH 1/3] powerpc: Allow platforms to force-enable CONFIG_SMP Michael Ellerman
2017-04-05 2:44 ` [RFC PATCH 2/3] powerpc/powernv: Always enable SMP when building powernv Michael Ellerman
2017-04-05 2:44 ` [RFC PATCH 3/3] powerpc/pseries: Always enable SMP when building pseries Michael Ellerman
@ 2017-04-13 13:40 ` Michael Ellerman
2017-04-19 3:47 ` [RFC,1/3] " Michael Ellerman
3 siblings, 0 replies; 5+ messages in thread
From: Michael Ellerman @ 2017-04-13 13:40 UTC (permalink / raw)
To: linuxppc-dev
Michael Ellerman <mpe@ellerman.id.au> writes:
> Of the 64-bit Book3S platforms, only powermac supports booting on an
> actual non-SMP system. The other platforms can be built with SMP
> disabled, but it doesn't make a lot of sense given the CPUs they support
> are all multicore or multithreaded.
>
> So give platforms the option of forcing SMP=y.
For the record I'm planning to merge this.
cheers
> diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/platforms/Kconfig.cputype
> index 99b0ae8acb78..5c011e4baf0b 100644
> --- a/arch/powerpc/platforms/Kconfig.cputype
> +++ b/arch/powerpc/platforms/Kconfig.cputype
> @@ -371,9 +371,15 @@ config PPC_PERF_CTRS
> help
> This enables the powerpc-specific perf_event back-end.
>
> +config FORCE_SMP
> + # Allow platforms to force SMP=y by selecting this
> + bool
> + default n
> + select SMP
> +
> config SMP
> depends on PPC_BOOK3S || PPC_BOOK3E || FSL_BOOKE || PPC_47x
> - bool "Symmetric multi-processing support"
> + bool "Symmetric multi-processing support" if !FORCE_SMP
> ---help---
> This enables support for systems with more than one CPU. If you have
> a system with only one CPU, say N. If you have a system with more
> --
> 2.7.4
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFC,1/3] powerpc: Allow platforms to force-enable CONFIG_SMP
2017-04-05 2:44 [RFC PATCH 1/3] powerpc: Allow platforms to force-enable CONFIG_SMP Michael Ellerman
` (2 preceding siblings ...)
2017-04-13 13:40 ` [RFC PATCH 1/3] powerpc: Allow platforms to force-enable CONFIG_SMP Michael Ellerman
@ 2017-04-19 3:47 ` Michael Ellerman
3 siblings, 0 replies; 5+ messages in thread
From: Michael Ellerman @ 2017-04-19 3:47 UTC (permalink / raw)
To: Michael Ellerman, linuxppc-dev
On Wed, 2017-04-05 at 02:44:49 UTC, Michael Ellerman wrote:
> Of the 64-bit Book3S platforms, only powermac supports booting on an
> actual non-SMP system. The other platforms can be built with SMP
> disabled, but it doesn't make a lot of sense given the CPUs they support
> are all multicore or multithreaded.
>
> So give platforms the option of forcing SMP=y.
>
> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Series applied to powerpc next.
https://git.kernel.org/powerpc/c/ebbe9d7d3a2ca0d62f1a2c08c7e7a3
cheers
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-04-19 3:47 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-05 2:44 [RFC PATCH 1/3] powerpc: Allow platforms to force-enable CONFIG_SMP Michael Ellerman
2017-04-05 2:44 ` [RFC PATCH 2/3] powerpc/powernv: Always enable SMP when building powernv Michael Ellerman
2017-04-05 2:44 ` [RFC PATCH 3/3] powerpc/pseries: Always enable SMP when building pseries Michael Ellerman
2017-04-13 13:40 ` [RFC PATCH 1/3] powerpc: Allow platforms to force-enable CONFIG_SMP Michael Ellerman
2017-04-19 3:47 ` [RFC,1/3] " Michael Ellerman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).