Re: [RFC PATCH v1 00/11] Create fast idle path for short idle periods

From: Paul E. McKenney
Date: Thu Jul 20 2017 - 12:03:03 EST


On Thu, Jul 20, 2017 at 04:19:40PM +0200, Peter Zijlstra wrote:
> On Thu, Jul 20, 2017 at 05:50:54AM -0700, Paul E. McKenney wrote:
> > >
> > > static void cpuidle_idle_call()
> > > {
> > > rcu_idle_enter()
> > > ......
> > > rcu_idle_exit()
> > > }
> > >
> > > I want
> > >
> > > static void cpuidle_idle_call()
> > > {
> > > if (tick stopped)
> > > rcu_idle_enter()
> > > ......
> > > if (tick stopped)
> > > rcu_idle_exit()
> > > }
> > >
> > > Or checking tick stop can be put into rcu_idle_enter/exit
> >
> > The answer is the traditional "it depends".
> >
> > If the above change was all that you did, that would be a bug in the
> > case where the predicted short idle time turned out to in reality be an
> > indefinite idle time.
>
> Can't be, you didn't disable the tick after all, so you're guaranteed to
> get interrupted by the tick and try again.

I will reserve judgment on that until I see the patch. But to your point,
I would indeed hope that it works that way. ;-)

Thanx, Paul