[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZrDaVXXgId3psGiz@chenyu5-mobl2>
Date: Mon, 5 Aug 2024 21:57:41 +0800
From: Chen Yu <yu.c.chen@...el.com>
To: Vincent Guittot <vincent.guittot@...aro.org>
CC: Ingo Molnar <mingo@...hat.com>, Peter Zijlstra <peterz@...radead.org>,
Dietmar Eggemann <dietmar.eggemann@....com>, Juri Lelli
<juri.lelli@...hat.com>, Hongyan Xia <hongyan.xia2@....com>, Qais Yousef
<qyousef@...alina.io>, Lukasz Luba <lukasz.luba@....com>,
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3] sched/pelt: Use rq_clock_task() for hw_pressure
On 2024-08-05 at 12:56:09 +0200, Vincent Guittot wrote:
> Sorry for the late reply on this
>
> On Mon, 29 Jul 2024 at 09:05, Chen Yu <yu.c.chen@...el.com> wrote:
> >
> > commit 97450eb90965 ("sched/pelt: Remove shift of thermal clock")
> > removed the decay_shift for hw_pressure. This commit uses the
> > sched_clock_task() in sched_tick() while it replaces the
> > sched_clock_task() with rq_clock_pelt() in __update_blocked_others().
>
> Good catch, it should be sched_clock_task() everywhere
>
> > This could bring inconsistence. One possible scenario I can think of
> > is in ___update_load_sum():
> >
> > u64 delta = now - sa->last_update_time
> >
> > 'now' could be calculated by rq_clock_pelt() from
> > __update_blocked_others(), and last_update_time was calculated by
> > rq_clock_task() previously from sched_tick(). Usually the former
> > chases after the latter, it cause a very large 'delta' and brings
> > unexpected behavior.
> >
> > Fix this by using rq_clock_task() inside update_hw_load_avg(),
> > because:
>
> No, don't call the rq_clock_task() inside update_hw_load_avg(), keep
> it outside. V2 was the correct solution
> Nack for this v3. Please come back on v2
OK, thanks for taking a look, I'll refine v2 and send v4 out.
thanks,
Chenyu
Powered by blists - more mailing lists