Re: [patch V2 09/28] x86/Kconfig: Select SCHED_SMT if SMP enabled
From: Konrad Rzeszutek Wilk
Date: Thu Nov 29 2018 - 09:44:43 EST
On Sun, Nov 25, 2018 at 07:33:37PM +0100, Thomas Gleixner wrote:
> CONFIG_SCHED_SMT is enabled by all distros, so there is not a real point to
> have it configurable. The runtime overhead in the core scheduler code is
> minimal because the actual SMT scheduling parts are conditional on a static
> key.
>
> This allows to expose the scheduler's SMT state static key to the
> speculation control code. Alternatively the scheduler's static key could be
> made always available when CONFIG_SMP is enabled, but that's just adding an
> unused static key to every other architecture for nothing.
>
> Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
>
> ---
> arch/x86/Kconfig | 8 +-------
> 1 file changed, 1 insertion(+), 7 deletions(-)
>
> --- a/arch/x86/Kconfig
> +++ b/arch/x86/Kconfig
> @@ -1001,13 +1001,7 @@ config NR_CPUS
> to the kernel image.
>
> config SCHED_SMT
> - bool "SMT (Hyperthreading) scheduler support"
> - depends on SMP
> - ---help---
> - SMT scheduler support improves the CPU scheduler's decision making
> - when dealing with Intel Pentium 4 chips with HyperThreading at a
> - cost of slightly increased overhead in some places. If unsure say
> - N here.
> + def_bool y if SMP
>
> config SCHED_MC
> def_bool y
>
>