sched/fair: Simplify asym_packing logic for SMT cores
authorRicardo Neri <ricardo.neri-calderon@linux.intel.com>
Thu, 6 Apr 2023 20:31:39 +0000 (13:31 -0700)
committerPeter Zijlstra <peterz@infradead.org>
Mon, 8 May 2023 08:58:34 +0000 (10:58 +0200)
commitef7657d4d2d6a8456aa624010de456c32a135fe9
treec1ed8982d6064a0df340fc56e92942e44c273752
parenteefefa716c9fa6aa73159f09954b7eeba4cafd09
sched/fair: Simplify asym_packing logic for SMT cores

Callers of asym_smt_can_pull_tasks() check the idle state of the
destination CPU and its SMT siblings, if any. No extra checks are needed
in such function.

Since SMT cores divide capacity among its siblings, priorities only really
make sense if only one sibling is active. This is true for SMT2, SMT4,
SMT8, etc. Do not use asym_packing load balance for this case. Instead,
let find_busiest_group() handle imbalances.

When balancing non-SMT cores or at higher scheduling domains (e.g.,
between MC scheduling groups), continue using priorities.

Signed-off-by: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Len Brown <len.brown@intel.com>
Tested-by: Zhang Rui <rui.zhang@intel.com>
Link: https://lore.kernel.org/r/20230406203148.19182-4-ricardo.neri-calderon@linux.intel.com
kernel/sched/fair.c