On Tue, 9 Feb 2021 at 14:09, Valentin Schneider
<valentin.schnei...@arm.com> wrote:
>
> On 05/02/21 12:48, Vincent Guittot wrote:
> > @@ -10517,16 +10499,11 @@ static void nohz_newidle_balance(struct rq 
> > *this_rq)
> >           time_before(jiffies, READ_ONCE(nohz.next_blocked)))
> >               return;
> >
>
> I was wondering whether all the conditions above were still relevant. I
> think they are, but this one:
>
>         /* Will wake up very soon. No time for doing anything else*/
>         if (this_rq->avg_idle < sysctl_sched_migration_cost)
>                 return;
>
> should have its comment updated to something like:
>
>         /*
>          * Will wake up very soon. Blocked load will be updated
>          * periodically, no need to wake an idle CPU.
>          */
>
> given kick_ilb() isn't the costliest of things.
>
> > -     raw_spin_unlock(&this_rq->lock);
> >       /*
> > -      * This CPU is going to be idle and blocked load of idle CPUs
> > -      * need to be updated. Run the ilb locally as it is a good
> > -      * candidate for ilb instead of waking up another idle CPU.
> > -      * Kick an normal ilb if we failed to do the update.
> > +      * Blocked load of idle CPUs need to be updated.
> > +      * Kick an ILB to update statistics.
> >        */
> > -     if (!_nohz_idle_balance(this_rq, NOHZ_STATS_KICK, CPU_NEWLY_IDLE))
> > -             kick_ilb(NOHZ_STATS_KICK);
> > -     raw_spin_lock(&this_rq->lock);
>
> With this change, the return value of _nohz_idle_balance() is no longer
> used. This means we could get rid of the tracking of whether it iterated
> over all nohz CPUs or not.

Yeah, the return is useless now

>
> > +     kick_ilb(NOHZ_STATS_KICK);
> >  }
> >
> >  #else /* !CONFIG_NO_HZ_COMMON */

Reply via email to