Re: [RFC][PATCH 9/9] cpuidle: Use local_clock_noinstr()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxx> 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.



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux