Re: [PATCH 3/6] sched/fair: Fix busiest group selection for asym groups

From: Tim Chen
Date: Fri May 05 2023 - 18:36:54 EST


On Fri, 2023-05-05 at 15:19 +0200, Peter Zijlstra wrote:
>
> >
> > case group_has_spare:
> > + /*
> > + * Do not pick sg with SMT CPUs over sg with pure CPUs,
> > + * as we do not want to pull task off half empty SMT core
> > + * and make the core idle.
> > + */
>
> Comment says what the code does; not why.

Good point, will make the comment better.

>
> > + if (asymmetric_groups(sds->busiest, sg)) {
> > + if (sds->busiest->flags & SD_SHARE_CPUCAPACITY)
> > + return true;
> > + else
> > + return false;
>
> return (sds->busiest->flags & SD_SHARE_CPUCAPACITY)
> > + }
>
> Also, should this not be part of the previous patch?

Sure, I can merge it with the previous patch.

Tim