sched/smt: Update sched_smt_present at runtime
authorPeter Zijlstra <peterz@infradead.org>
Tue, 29 May 2018 14:43:46 +0000 (16:43 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Aug 2018 16:12:51 +0000 (18:12 +0200)
commitfc890e9b571fb273e714bae5de682226eaed9cb2
tree54c2f0c59eb67209c795778795db02be903903e8
parent202f9056085f9380ff82fff5218e343c3f244956
sched/smt: Update sched_smt_present at runtime

commit ba2591a5993eabcc8e874e30f361d8ffbb10d6d4 upstream

The static key sched_smt_present is only updated at boot time when SMT
siblings have been detected. Booting with maxcpus=1 and bringing the
siblings online after boot rebuilds the scheduling domains correctly but
does not update the static key, so the SMT code is not enabled.

Let the key be updated in the scheduler CPU hotplug code to fix this.

Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Acked-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/sched/core.c
kernel/sched/fair.c