From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757525AbbGUB6K (ORCPT ); Mon, 20 Jul 2015 21:58:10 -0400 Received: from smtprelay0138.hostedemail.com ([216.40.44.138]:40721 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1757393AbbGUB6I (ORCPT ); Mon, 20 Jul 2015 21:58:08 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::::::::::::::::::::::::,RULES_HIT:41:69:355:379:541:599:800:960:973:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2198:2199:2393:2553:2559:2562:2828:3138:3139:3140:3141:3142:3353:3622:3865:3866:3867:3868:3870:3871:3872:3874:4321:5007:6261:6742:8957:10004:10400:10848:10967:11026:11232:11658:11914:12043:12438:12517:12519:12555:12683:12740:13069:13255:13311:13357:14096:14097:21067:21080,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0 X-HE-Tag: ants03_80ae98ff4855a X-Filterd-Recvd-Size: 3244 Message-ID: <1437443883.28284.8.camel@perches.com> Subject: Re: [PATCH tip/core/rcu 15/16] scripts: Make checkpatch.pl warn on expedited RCU grace periods From: Joe Perches To: paulmck@linux.vnet.ibm.com Cc: Steven Rostedt , linux-kernel@vger.kernel.org, mingo@kernel.org, laijs@cn.fujitsu.com, dipankar@in.ibm.com, akpm@linux-foundation.org, mathieu.desnoyers@efficios.com, josh@joshtriplett.org, tglx@linutronix.de, peterz@infradead.org, dhowells@redhat.com, edumazet@google.com, dvhart@linux.intel.com, fweisbec@gmail.com, oleg@redhat.com, bobby.prani@gmail.com, Andy Whitcroft Date: Mon, 20 Jul 2015 18:58:03 -0700 In-Reply-To: <20150721012936.GQ3717@linux.vnet.ibm.com> References: <20150717221949.GA12304@linux.vnet.ibm.com> <1437171616-13832-1-git-send-email-paulmck@linux.vnet.ibm.com> <1437171616-13832-15-git-send-email-paulmck@linux.vnet.ibm.com> <1437172674.2495.60.camel@perches.com> <20150720205547.150c7a05@grimm.local.home> <1437440779.28284.7.camel@perches.com> <20150721012936.GQ3717@linux.vnet.ibm.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.12.11-0ubuntu3 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2015-07-20 at 18:29 -0700, Paul E. McKenney wrote: > On Mon, Jul 20, 2015 at 06:06:19PM -0700, Joe Perches wrote: > > On Mon, 2015-07-20 at 20:55 -0400, Steven Rostedt wrote: > > > On Fri, 17 Jul 2015 15:37:54 -0700 > > > Joe Perches wrote: > > > > > > > > + if ($line =~ /\b(synchronize_rcu_expedited|synchronize_sched_expedited)\(/) { > > > > > > > > It'd be faster perl without capture groups: > > > > > > Is checkpatch such a critical code path that we could possibly notice > > > the difference in speed? Although the above may be few microseconds > > > slower, to me, the above looks a hell of a lot more readable. > > > > Regardless, it's not as capable as it wouldn't find > > any miswritten form like > > > > synchronize__expedited ( args... ) > > Hmmm... My current patch doesn't complain about this: > > ------------------------------------------------------------------------ > > diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c > index 77192953dee5..89577b8d3ba6 100644 > --- a/kernel/rcu/rcutorture.c > +++ b/kernel/rcu/rcutorture.c > @@ -492,6 +492,8 @@ static void srcu_read_delay(struct torture_random_state *rrsp) > const long uspertick = 1000000 / HZ; > const long longdelay = 10; > > + synchronize_srcu_expedited(srcu_ctlp); > + > /* We want there to be long-running readers, but not all the time. */ > > delay = torture_random(rrsp) % > > ------------------------------------------------------------------------ > > But it does correctly complain when I add synchronize_rcu_expedited() > or synchronize_sched_expedited(). > > So what am I missing here? A space between the function name and the open parenthesis