sched/fair: Only do asym_packing load balancing from fully idle SMT cores
authorRicardo Neri <ricardo.neri-calderon@linux.intel.com>
Thu, 6 Apr 2023 20:31:38 +0000 (13:31 -0700)
committerPeter Zijlstra <peterz@infradead.org>
Mon, 8 May 2023 08:58:34 +0000 (10:58 +0200)
commiteefefa716c9fa6aa73159f09954b7eeba4cafd09
tree136f5121cb6e267b4cc472e48fce0f9e83de0d18
parent8b36d07f1d63de102d464f44a89704bc62d00811
sched/fair: Only do asym_packing load balancing from fully idle SMT cores

When balancing load between cores, all the SMT siblings of the destination
CPU, if any, must be idle. Otherwise, pulling new tasks degrades the
throughput of the busy SMT siblings. The overall throughput of the system
remains the same.

When balancing load within an SMT core this consideration is not relevant.
Follow the priorities that hardware indicates.

Suggested-by: Valentin Schneider <vschneid@redhat.com>
Signed-off-by: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Tested-by: Zhang Rui <rui.zhang@intel.com>
Link: https://lore.kernel.org/r/20230406203148.19182-3-ricardo.neri-calderon@linux.intel.com
kernel/sched/fair.c