Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758801AbcKCQWg (ORCPT ); Thu, 3 Nov 2016 12:22:36 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:57399 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1758189AbcKCQWe (ORCPT ); Thu, 3 Nov 2016 12:22:34 -0400 Date: Thu, 3 Nov 2016 09:22:28 -0700 From: "Paul E. McKenney" To: Sebastian Andrzej Siewior Cc: "Michael S. Tsirkin" , Julia Cartwright , Luiz Capitulino , linux-rt-users@vger.kernel.org, Josh Triplett , Steven Rostedt , Mathieu Desnoyers , Lai Jiangshan , linux-kernel@vger.kernel.org Subject: Re: [PATCH] rcu: update: make RCU_EXPEDITE_BOOT default Reply-To: paulmck@linux.vnet.ibm.com References: <20161012124956.3cb5f988@redhat.com> <20161012171553.GA18392@jcartwri.amer.corp.natinst.com> <20161012203223.GK29518@linux.vnet.ibm.com> <20161013191332-mutt-send-email-mst@kernel.org> <20161014092050.GW29518@linux.vnet.ibm.com> <20161016044420-mutt-send-email-mst@kernel.org> <20161016112846.GR29518@linux.vnet.ibm.com> <20161031173852.a3ji7hhgjis5l3u4@linutronix.de> <20161031181543.GN3716@linux.vnet.ibm.com> <20161102163002.igni3zdnid535nou@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161102163002.igni3zdnid535nou@linutronix.de> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-GCONF: 00 X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16110316-0016-0000-0000-00000512B3DB X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00006026; HX=3.00000240; KW=3.00000007; PH=3.00000004; SC=3.00000189; SDB=6.00776286; UDB=6.00373399; IPR=6.00553445; BA=6.00004855; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00013202; XFM=3.00000011; UTC=2016-11-03 16:22:31 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16110316-0017-0000-0000-000034536AB3 Message-Id: <20161103162228.GG3716@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-11-03_05:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1609300000 definitions=main-1611030302 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2608 Lines: 82 On Wed, Nov 02, 2016 at 05:30:02PM +0100, Sebastian Andrzej Siewior wrote: > RCU_EXPEDITE_BOOT should speed up the boot process by enforcing > synchronize_rcu_expedited() instead of synchronize_rcu() during the boot > process. There should be no reason why one does not want this and there > is no need worry about real time latency at this point. > Therefore make it default. > > Signed-off-by: Sebastian Andrzej Siewior Well, it has been awhile since I removed a Kconfig parameter. So why could this be a bad thing? 1. Very large systems might see scalability issues with unconditional expediting at boot. But if we don't try it, we won't know. 2. People bringing up new hardware might not want quite so many IPIs. But they can just set rcu_normal to prevent that. I am therefore queuing it for testiong and review. ;-) Thanx, Paul > --- > Checked on two boxes and synchronize_rcu() was invoked four times before > it reached rcu_end_inkernel_boot() > > init/Kconfig | 13 ------------- > kernel/rcu/update.c | 6 ++---- > 2 files changed, 2 insertions(+), 17 deletions(-) > > diff --git a/init/Kconfig b/init/Kconfig > index b6c9166d878a..fe51bd3bbc61 100644 > --- a/init/Kconfig > +++ b/init/Kconfig > @@ -771,19 +771,6 @@ config RCU_NOCB_CPU_ALL > > endchoice > > -config RCU_EXPEDITE_BOOT > - bool > - default n > - help > - This option enables expedited grace periods at boot time, > - as if rcu_expedite_gp() had been invoked early in boot. > - The corresponding rcu_unexpedite_gp() is invoked from > - rcu_end_inkernel_boot(), which is intended to be invoked > - at the end of the kernel-only boot sequence, just before > - init is exec'ed. > - > - Accept the default if unsure. > - > endmenu # "RCU Subsystem" > > config BUILD_BIN2C > diff --git a/kernel/rcu/update.c b/kernel/rcu/update.c > index b40d3468ba4e..419ca811bda9 100644 > --- a/kernel/rcu/update.c > +++ b/kernel/rcu/update.c > @@ -130,8 +130,7 @@ bool rcu_gp_is_normal(void) > } > EXPORT_SYMBOL_GPL(rcu_gp_is_normal); > > -static atomic_t rcu_expedited_nesting = > - ATOMIC_INIT(IS_ENABLED(CONFIG_RCU_EXPEDITE_BOOT) ? 1 : 0); > +static atomic_t rcu_expedited_nesting = ATOMIC_INIT(1); > > /* > * Should normal grace-period primitives be expedited? Intended for > @@ -179,8 +178,7 @@ EXPORT_SYMBOL_GPL(rcu_unexpedite_gp); > */ > void rcu_end_inkernel_boot(void) > { > - if (IS_ENABLED(CONFIG_RCU_EXPEDITE_BOOT)) > - rcu_unexpedite_gp(); > + rcu_unexpedite_gp(); > if (rcu_normal_after_boot) > WRITE_ONCE(rcu_normal, 1); > } > -- > 2.10.2 >