[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220929163624.GN4196@paulmck-ThinkPad-P17-Gen-1>
Date: Thu, 29 Sep 2022 09:36:24 -0700
From: "Paul E. McKenney" <paulmck@...nel.org>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Joel Fernandes <joel@...lfernandes.org>,
Frederic Weisbecker <fweisbec@...il.com>,
Thomas Gleixner <tglx@...utronix.de>,
linux-kernel@...r.kernel.org, Boqun Feng <boqun.feng@...il.com>,
"Rafael J. Wysocki" <rjw@...ysocki.net>
Subject: Re: RCU vs NOHZ
On Thu, Sep 29, 2022 at 06:18:32PM +0200, Peter Zijlstra wrote:
> On Thu, Sep 29, 2022 at 08:20:44AM -0700, Paul E. McKenney wrote:
>
> > > To recap; we want the CPU to go into deeper idle states, no?
> > >
> > > RCU can currently inhibit this by having callbacks pending for this CPU
> > > -- in this case RCU inhibits NOHZ-IDLE and deep power states are not
> > > selected or less effective.
> > >
> > > Now, deep idle states actually purge the caches, so cache locality
> > > cannot be an argument to keep the callbacks local.
> > >
> > > We know when we're doing deep idle we stop the tick.
> > >
> > > So why not, when stopping the tick, move the RCU pending crud elsewhere
> > > and let the CPU get on with going idle instead of inhibiting the
> > > stopping of the tick and wrecking deep idle?
> >
> > Because doing so in the past has cost more energy than is saved.
>
> How has this been tried; and why did the energy cost go up? Is this
> because the offload thread ends up waking up the CPU we just put to
> sleep?
Because doing the additional work consumes energy. I am not clear on
exactly what you are asking for here, given the limitations of the tools
that measure energy consumption.
> By default I think the offload stuff just doesn't work well for
> !NOHZ_FULL situations; that is, NOHZ_FULL is the only case where there
> are housekeeper CPUs that take care of the offload threads.
>
> Hence my initial suggestion to force the pending work into the jiffy
> owner CPU.
By all means, please feel free to prove me wrong. But doing so requires
real code and real testing of real energy consumption by real hardware
running real workloads.
It also requires correctly handling races with all and sundry.
Thanx, Paul
Powered by blists - more mailing lists