sched/fair: Consider SMT in ASYM_PACKING load balance
authorRicardo Neri <ricardo.neri-calderon@linux.intel.com>
Sat, 11 Sep 2021 01:18:19 +0000 (18:18 -0700)
committerPeter Zijlstra <peterz@infradead.org>
Tue, 5 Oct 2021 13:52:06 +0000 (15:52 +0200)
commit4006a72bdd93b1ffedc2bd8646dee18c822a2c26
treeb7503326c996aa67714a07308c02d4c2e0557ece
parentaafc917a3c31dcc76cb0279cd7617dda11b15f2a
sched/fair: Consider SMT in ASYM_PACKING load balance

When deciding to pull tasks in ASYM_PACKING, it is necessary not only to
check for the idle state of the destination CPU, dst_cpu, but also of
its SMT siblings.

If dst_cpu is idle but its SMT siblings are busy, performance suffers
if it pulls tasks from a medium priority CPU that does not have SMT
siblings.

Implement asym_smt_can_pull_tasks() to inspect the state of the SMT
siblings of both dst_cpu and the CPUs in the candidate busiest group.

Signed-off-by: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Joel Fernandes (Google) <joel@joelfernandes.org>
Reviewed-by: Len Brown <len.brown@intel.com>
Reviewed-by: Vincent Guittot <vincent.guittot@linaro.org>
Link: https://lkml.kernel.org/r/20210911011819.12184-7-ricardo.neri-calderon@linux.intel.com
kernel/sched/fair.c