Re: [tip: sched/core] sched,fair: skip newidle_balance if a wakeup is pending
From: Peter Zijlstra
Date: Thu Apr 22 2021 - 04:15:38 EST
On Thu, Apr 22, 2021 at 07:36:00AM -0000, tip-bot2 for Rik van Riel wrote:
> @@ -10684,7 +10693,12 @@ out:
> if (time_after(this_rq->next_balance, next_balance))
> this_rq->next_balance = next_balance;
>
> - if (pulled_task)
> + /*
> + * If we are no longer idle, do not let the time spent here pull
> + * down this_rq->avg_idle. That could lead to newidle_balance not
> + * doing enough work, and the CPU actually going idle.
> + */
> + if (pulled_task || this_rq->ttwu_pending)
> this_rq->idle_stamp = 0;
I've un-committed this patch, because vingu was reporting increased idle
time because of this hunk. I had mistakenly assumed that was sorted
with v3, sorry for not keeping better track of things.
(also, now that I look again, please also fix the Subject to have a
capital after the :)