Re: [PATCH v4 1/2] sched/fair: Check a task has a fitting cpu when updating misfit

Qais Yousef
2024-01-26T00:37:18Z

On 01/25/24 18:44, Vincent Guittot wrote:
> On Wed, 24 Jan 2024 at 23:46, Qais Yousef <qyousef@layalina.io> wrote:
> >
> > On 01/23/24 09:32, Vincent Guittot wrote:
> >
> > > > > @@ -9583,9 +9630,7 @@ check_cpu_capacity(struct rq *rq, struct sched_domain *sd)
> > > > > */
> > > > > static inline int check_misfit_status(struct rq *rq, struct sched_domain *sd)
> > > > > {
> > > > > - return rq->misfit_task_load &&
> > > > > - (arch_scale_cpu_capacity(rq->cpu) < rq->rd->max_cpu_capacity ||
> > > > > - check_cpu_capacity(rq, sd));
> > > > > + return rq->misfit_task_load && check_cpu_capacity(rq, sd);
>
> Coming back to this:
> With your change above, misfit can't kick an idle load balance and
> must wait for the cpu capacity being noticeably reduced by something
> else

Good catch, yes. It's a subtle change. We need to keep this and better add
a comment that we move immediately for all CPUs except the biggest one where we
need to check_cpu_capacity().