Re: [Patch v3 05/13] x86/smt: Create cpu_smt_enabled static key for SMT specific code

From: Peter Zijlstra
Date: Fri Oct 19 2018 - 03:52:16 EST


On Wed, Oct 17, 2018 at 10:59:33AM -0700, Tim Chen wrote:
> diff --git a/kernel/cpu.c b/kernel/cpu.c
> index 3adecda..ad28afc 100644
> --- a/kernel/cpu.c
> +++ b/kernel/cpu.c
> @@ -349,6 +349,8 @@ EXPORT_SYMBOL_GPL(cpu_hotplug_enable);
> #ifdef CONFIG_HOTPLUG_SMT
> enum cpuhp_smt_control cpu_smt_control __read_mostly = CPU_SMT_ENABLED;
> EXPORT_SYMBOL_GPL(cpu_smt_control);
> +DEFINE_STATIC_KEY_TRUE(cpu_smt_enabled);
> +EXPORT_SYMBOL_GPL(cpu_smt_enabled);

We already have sched_smt_present; please merge the two. It is pointless
having this twice.