lkml.org 
[lkml]   [2021]   [Feb]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 1/6] sched/fair: remove update of blocked load from newidle_balance
Date
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.

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

\
 
 \ /
  Last update: 2021-02-09 14:11    [W:0.137 / U:1.740 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site