[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170712185034.GA2393@linux.vnet.ibm.com>
Date: Wed, 12 Jul 2017 11:50:34 -0700
From: "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Frederic Weisbecker <fweisbec@...il.com>,
Christoph Lameter <cl@...ux.com>,
"Li, Aubrey" <aubrey.li@...ux.intel.com>,
Andi Kleen <ak@...ux.intel.com>,
Aubrey Li <aubrey.li@...el.com>, tglx@...utronix.de,
len.brown@...el.com, rjw@...ysocki.net, tim.c.chen@...ux.intel.com,
arjan@...ux.intel.com, yang.zhang.wz@...il.com, x86@...nel.org,
linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH v1 00/11] Create fast idle path for short idle periods
On Wed, Jul 12, 2017 at 07:57:32PM +0200, Peter Zijlstra wrote:
> On Wed, Jul 12, 2017 at 07:17:56PM +0200, Peter Zijlstra wrote:
> > Could be I'm just not remembering how all that works.. But I was
> > wondering if we can do the expensive bits if we've decided to actually
> > go NOHZ and avoid doing it on every idle entry.
> >
> > IIRC the RCU fast NOHZ bits try and flush the callback list (or paw it
> > off to another CPU?) such that we can go NOHZ sooner. Having a !empty
> > callback list avoid NOHZ from happening.
> >
> > Now if we've already decided we can't in fact go NOHZ due to other
> > concerns, flushing the callback list is pointless work. So I'm thinking
> > we can find a better place to do this.
>
> I'm a wee bit confused by the split between rcu_prepare_for_idle() and
> rcu_needs_cpu().
>
> There's a fair amount overlap there.. that said, I'm thinking we should
> be calling rcu_needs_cpu() as the very last test, not the very first,
> such that we can bail out of tick_nohz_stop_sched_tick() without having
> to incur the penalty of flushing callbacks.
Maybe or maybe not, please see my earlier email for more details.
TL;DR: No, callbacks are no longer flushed. Yes, there is dependency.
Not hard to make rcu_prepare_for_idle() deal with rcu_needs_cpu() not
having been called, but it does need to happen. Putting rcu_needs_cpu()
last is not necessarily a good thing. If CPUs going idle normally
don't have callbacks, it won't help. So we need hard evidence that
rcu_needs_cpu() is consuming significant time before hacking.
Thanx, Paul
Powered by blists - more mailing lists