Re: [PATCH v2 3/4] sched/fair: Consider SMT in ASYM_PACKING load balance

From: Peter Zijlstra
Date: Mon May 03 2021 - 06:03:28 EST


On Tue, Apr 13, 2021 at 07:04:35PM -0700, Ricardo Neri wrote:
> @@ -8507,6 +8616,18 @@ static bool update_sd_pick_busiest(struct lb_env *env,
> if (!sgs->sum_h_nr_running)
> return false;
>
> + /*
> + * @sg may have been tentatively classified as group_asym_packing.
> + * Now that we have sufficient information about @sds.local, reassess
> + * if asym packing migration can be done. Reclassify @sg. The only
> + * possible results are group_has_spare and group_fully_busy.
> + */
> + if (sgs->group_type == group_asym_packing &&
> + !asym_can_pull_tasks(env->dst_cpu, sds, sgs, sg)) {
> + sgs->group_asym_packing = 0;
> + sgs->group_type = group_classify(env->sd->imbalance_pct, sg, sgs);
> + }

So if this really is all about not having sds.local in
update_sd_lb_stats(), then that seems fixable. Let me haz a try.