[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230509190231.GA2148518@hirez.programming.kicks-ass.net>
Date: Tue, 9 May 2023 21:02:31 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: "Rafael J. Wysocki" <rafael@...nel.org>
Cc: bigeasy@...utronix.de, mark.rutland@....com, maz@...nel.org,
catalin.marinas@....com, will@...nel.org, chenhuacai@...nel.org,
kernel@...0n.name, hca@...ux.ibm.com, gor@...ux.ibm.com,
agordeev@...ux.ibm.com, borntraeger@...ux.ibm.com,
svens@...ux.ibm.com, pbonzini@...hat.com, wanpengli@...cent.com,
vkuznets@...hat.com, tglx@...utronix.de, mingo@...hat.com,
bp@...en8.de, dave.hansen@...ux.intel.com, x86@...nel.org,
hpa@...or.com, jgross@...e.com, boris.ostrovsky@...cle.com,
daniel.lezcano@...aro.org, kys@...rosoft.com,
haiyangz@...rosoft.com, wei.liu@...nel.org, decui@...rosoft.com,
longman@...hat.com, boqun.feng@...il.com, pmladek@...e.com,
senozhatsky@...omium.org, rostedt@...dmis.org,
john.ogness@...utronix.de, juri.lelli@...hat.com,
vincent.guittot@...aro.org, dietmar.eggemann@....com,
bsegall@...gle.com, mgorman@...e.de, bristot@...hat.com,
vschneid@...hat.com, jstultz@...gle.com, sboyd@...nel.org,
linux-kernel@...r.kernel.org, loongarch@...ts.linux.dev,
linux-s390@...r.kernel.org, kvm@...r.kernel.org,
linux-hyperv@...r.kernel.org, linux-pm@...r.kernel.org
Subject: Re: [RFC][PATCH 9/9] cpuidle: Use local_clock_noinstr()
On Tue, May 09, 2023 at 06:18:08PM +0200, Rafael J. Wysocki wrote:
> On Mon, May 8, 2023 at 11:34 PM Peter Zijlstra <peterz@...radead.org> wrote:
> > --- a/drivers/cpuidle/poll_state.c
> > +++ b/drivers/cpuidle/poll_state.c
> > @@ -15,7 +15,7 @@ static int __cpuidle poll_idle(struct cp
> > {
> > u64 time_start;
> >
> > - time_start = local_clock();
> > + time_start = local_clock_noinstr();
> >
> > dev->poll_time_limit = false;
> >
> > @@ -32,7 +32,7 @@ static int __cpuidle poll_idle(struct cp
> > continue;
> >
> > loop_count = 0;
> > - if (local_clock() - time_start > limit) {
> > + if (local_clock_noinstr() - time_start > limit) {
> > dev->poll_time_limit = true;
> > break;
> > }
> >
>
> The above LGTM, but the teo governors uses local_clock() too. Should
> it use the _noinstr() version?
Only the callsites from noinstr or __cpuidle functions, IIRC the
governors are neither and should be OK.
Powered by blists - more mailing lists