Re: [PATCH v4 07/24] sched/fair: Compute IPC class scores for load balancing

From: Ricardo Neri
Date: Thu Jul 06 2023 - 19:46:11 EST


On Mon, Jun 26, 2023 at 02:01:25PM -0700, Tim Chen wrote:
> On Sun, 2023-06-25 at 13:11 -0700, Ricardo Neri wrote:
> >
> > > > +
> > > > + score_on_dst_cpu = arch_get_ipcc_score(sgs->min_ipcc, env->dst_cpu);
> > > > +
> > > > + /*
> > > > + * Do not use IPC scores. sgs::ipcc_score_{after, before} will be zero
> > > > + * and not used.
> > > > + */
>
> The comment is not matching the check below. If zero
> is not used, the check should also reflect the case.

Agreed. This comment is not clear. I meant to say that returning here
has the effect of leaving the `before` and `after` scores of this group as
zero.

Since zero is the minimum possible score, this group will not be selected
during the tie breaker, unless the statistics of all other groups are also
zero.

>
> > > > + if (IS_ERR_VALUE(score_on_dst_cpu))
> > > > + return;
> > > > +
> > > > + before = sgs->sum_score;
> > > > + after = before - sgs->min_score;
> > >
> >
> Tim