Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932241AbdGLRSL (ORCPT ); Wed, 12 Jul 2017 13:18:11 -0400 Received: from bombadil.infradead.org ([65.50.211.133]:41439 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932080AbdGLRSJ (ORCPT ); Wed, 12 Jul 2017 13:18:09 -0400 Date: Wed, 12 Jul 2017 19:17:56 +0200 From: Peter Zijlstra To: "Paul E. McKenney" Cc: Frederic Weisbecker , Christoph Lameter , "Li, Aubrey" , Andi Kleen , Aubrey Li , tglx@linutronix.de, len.brown@intel.com, rjw@rjwysocki.net, tim.c.chen@linux.intel.com, arjan@linux.intel.com, yang.zhang.wz@gmail.com, x86@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH v1 00/11] Create fast idle path for short idle periods Message-ID: <20170712171756.e3fnc3waanbaiiss@hirez.programming.kicks-ass.net> References: <20170710144609.GD31832@tassilo.jf.intel.com> <20170710164206.5aon5kelbisxqyxq@hirez.programming.kicks-ass.net> <20170710172705.GA3441@tassilo.jf.intel.com> <20170711094157.5xcwkloxnjehieqv@hirez.programming.kicks-ass.net> <20170711160926.GA18805@lerouge> <20170711163422.etydkhhtgfthpfi5@hirez.programming.kicks-ass.net> <20170711180931.GP2393@linux.vnet.ibm.com> <20170712122249.u6y4ymmk6qwvog57@hirez.programming.kicks-ass.net> <20170712155458.GW2393@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170712155458.GW2393@linux.vnet.ibm.com> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1687 Lines: 36 On Wed, Jul 12, 2017 at 08:54:58AM -0700, Paul E. McKenney wrote: > On Wed, Jul 12, 2017 at 02:22:49PM +0200, Peter Zijlstra wrote: > > On Tue, Jul 11, 2017 at 11:09:31AM -0700, Paul E. McKenney wrote: > > > On Tue, Jul 11, 2017 at 06:34:22PM +0200, Peter Zijlstra wrote: > > > > Also, RCU_FAST_NO_HZ will make a fairly large difference here.. Paul > > > > what's the state of that thing, do we actually want that or not? > > > > > > If you are battery powered and don't have tight real-time latency > > > constraints, you want it -- it has represent a 30-40% boost in battery > > > lifetime for some low-utilization battery-powered devices. Otherwise, > > > probably not. > > > > Would it make sense to hook that off of tick_nohz_idle_enter(); in > > specific the part where we actually stop the tick; instead of every > > idle? > > The actions RCU takes on RCU_FAST_NO_HZ depend on the current state of > the CPU's callback lists, so it seems to me that the decision has to > be made on each idle entry. > > Now it might be possible to make the checks more efficient, and doing > that is on my list. > > Or am I missing your point? 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.