Re: [PATCH 4/6] sched/fair: Skip prefer sibling move between SMT group and non-SMT group
From: Vincent Guittot
Date: Tue May 09 2023 - 09:37:11 EST
On Thu, 4 May 2023 at 18:11, Tim Chen <tim.c.chen@xxxxxxxxxxxxxxx> wrote:
> From: Tim C Chen <tim.c.chen@xxxxxxxxxxxxxxx>
> Do not try to move tasks between non SMT sched group and SMT sched
> group for "prefer sibling" load balance.
> Let asym_active_balance_busiest() handle that case properly.
> Otherwise we could get task bouncing back and forth between
> the SMT sched group and non SMT sched group.
> Reviewed-by: Ricardo Neri <ricardo.neri-calderon@xxxxxxxxxxxxxxx>
> Signed-off-by: Tim Chen <tim.c.chen@xxxxxxxxxxxxxxx>
> kernel/sched/fair.c | 4 ++++
> 1 file changed, 4 insertions(+)
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index 8a325db34b02..58ef7d529731 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -10411,8 +10411,12 @@ static struct sched_group *find_busiest_group(struct lb_env *env)
> * Try to move all excess tasks to a sibling domain of the busiest
> * group's child domain.
> + *
> + * Do not try to move between non smt sched group and smt sched
> + * group. Let asym active balance properly handle that case.
> if (sds.prefer_sibling && local->group_type == group_has_spare &&
> + !asymmetric_groups(sds.busiest, sds.local) &&
Can't you delete SD_PREFER_SIBLING flags when building topology like
SD_ASYM_CPUCAPACITY does ?
Generally speaking SD_ASYM_CPUCAPACITY and SD_ASYM_PACKING are doing
quite similar thing, it would be good to get one common solution
instead 2 parallel paths
> busiest->sum_nr_running > local->sum_nr_running + 1)
> goto force_balance;