Messages in this thread |  | | Subject | Re: [PATCH v3 0/5] Improve newidle lb cost tracking and early abort | From | Tim Chen <> | Date | Wed, 27 Oct 2021 13:53:32 -0700 |
| |
On Wed, 2021-10-27 at 10:49 +0200, Vincent Guittot wrote: > > > Looking at the profile on update_blocked_averages a bit more, > > the majority of the call to update_blocked_averages > > happens in run_rebalance_domain. And we are not > > including that cost of update_blocked_averages for > > run_rebalance_domains in our current patch set. I think > > the patch set should account for that too. > > nohz_newidle_balance keeps using sysctl_sched_migration_cost to > trigger a _nohz_idle_balance(cpu_rq(cpu), NOHZ_STATS_KICK, CPU_IDLE); > This would probably benefit to take into account the cost of > update_blocked_averages instead >
For the case where
this_rq->avg_idle < sysctl_sched_migration_cost
in newidle_balance(), we skip to the out: label
out: /* Move the next balance forward */ if (time_after(this_rq->next_balance, next_balance)) this_rq->next_balance = next_balance;
if (pulled_task) this_rq->idle_stamp = 0; else nohz_newidle_balance(this_rq);
and we call nohz_newidle_balance as we don't have a pulled_task.
It seems to make sense to skip the call to nohz_newidle_balance() for this case? We expect a very short idle and a task to wake shortly. So we do not have to pull a task to this idle cpu and incur the migration cost.
Tim
|  |