Re: [PATCH v6 2/2] sched: update the rq->avg_idle when a task is moved to an idle CPU
From: Vincent Guittot
Date: Fri Jan 09 2026 - 08:43:07 EST
On Wed, 7 Jan 2026 at 16:48, Dietmar Eggemann <dietmar.eggemann@xxxxxxx> wrote:
>
> On 17.12.25 17:15, Dietmar Eggemann wrote:
> > On 15.12.25 10:35, Shijie Huang wrote:
> >>
> >> On 12/12/2025 22:22, Dietmar Eggemann wrote:
>
> [...]
>
> > I think Vincent is right by saying the update_rq_avg_idle() should be
> > put into put_prev_task_idle() instead.
> >
> > Still waiting for the DCPerf Mediawiki test results to see if this
> > change fixes my 'rq->avg_idle being too big' issue.
>
> Turns out the patch didn't fix this issue. Still seeing a huge number of
> sched_balance_newidle() calls in which the system is (1) overloaded and
> (2) this_rq->avg_idle >= sd->max_newidle_lb_cost so that there is no
> early bailout and no task is pulled at the end. Must be something else ...
Do you mean the v6 or v7 version ?
sched_balance_newidle() will be called every time there is no cfs or
higher priority tasks to pick next but we will not loop the sched
domains and bail out early. So having a huge number of call to
sched_balance_newidle() is normal but if you don't bail out early and
loop the sched domain then it's a problem