Tim Chen 450e749707 sched/fair: Fix SMT4 group_smt_balance handling
For SMT4, any group with more than 2 tasks will be marked as
group_smt_balance. Retain the behaviour of group_has_spare by marking
the busiest group as the group which has the least number of idle_cpus.

Also, handle rounding effect of adding (ncores_local + ncores_busy) when
the local is fully idle and busy group imbalance is less than 2 tasks.
Local group should try to pull at least 1 task in this case so imbalance
should be set to 2 instead.

Fixes: fee1759e4f04 ("sched/fair: Determine active load balance for SMT sched groups")
Acked-by: Shrikanth Hegde <sshegde@linux.vnet.ibm.com>
Signed-off-by: Tim Chen <tim.c.chen@linux.intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: http://lkml.kernel.org/r/6cd1633036bb6b651af575c32c2a9608a106702c.camel@linux.intel.com
2023-09-13 15:03:06 +02:00
..
2023-08-28 09:31:32 -07:00
2023-07-19 09:43:25 +02:00
2023-07-09 10:24:22 -07:00
2023-08-28 16:35:01 -07:00
2022-12-21 14:31:52 -08:00
2023-08-28 17:05:58 -07:00
2022-08-29 19:47:03 -04:00
2022-09-26 10:13:13 -07:00
2023-07-31 17:32:44 +02:00
2023-03-24 11:01:29 +01:00
2023-06-28 15:51:08 -07:00
2023-06-09 17:44:15 -07:00
2023-07-01 08:26:23 -07:00
2023-07-06 10:06:04 -07:00
2023-06-28 16:05:21 -07:00