sched/smt: Update sched_smt_present at runtime
authorPeter Zijlstra <peterz@infradead.org>
Tue, 29 May 2018 14:43:46 +0000 (16:43 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 21 Jun 2018 12:20:56 +0000 (14:20 +0200)
commitba2591a5993eabcc8e874e30f361d8ffbb10d6d4
tree4c39c4c1da38825d75baf4c76e2ebeefb0e17ff1
parent56563f53d3066afa9e63d6c997bf67e76a8b05c0
sched/smt: Update sched_smt_present at runtime

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>
kernel/sched/core.c
kernel/sched/fair.c