Re: [PATCH v4 1/6] sched/fair: Do not skip CPUs of similar capacity with busy SMT siblings
From: Ricardo Neri
Date: Tue Jun 09 2026 - 23:21:40 EST
On Tue, Jun 09, 2026 at 11:59:00AM +0530, K Prateek Nayak wrote:
> Hello Chenyu,
>
> On 6/9/2026 11:54 AM, Chen, Yu C wrote:
> >>> @@ -12964,8 +12965,12 @@ static struct rq *sched_balance_find_src_rq(struct lb_env *env,
> >>> * eventually lead to active_balancing high->low capacity.
> >>> * Higher per-CPU capacity is considered better than balancing
> >>> * average load.
> >>> + *
> >>> + * Busy SMT siblings reduce the capacity of CPU i. Do not skip
> >>> + * it in this case.
> >>> */
> >>> if (env->sd->flags & SD_ASYM_CPUCAPACITY &&
> >>
> >> ...
> >>
> >> if (asym_balance) {
> >> /* Busy SMT reduces capacity */
> >> if (sched_smt_active() && !is_core_idle(i))
> >> continue;
> >
> > We might not want to skip i if it has SMT busy siblings?
> > if ((!sched_smt_active() || is_core_idle(i)) && ...
>
> Ah yes! I forgot to do the ! of the condition :-)
> Thank you for the correction.
Thanks for these suggestions. It makes sense to me to only evaluate the
state of SMT siblings when actually needed. I will make the change.