From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752215AbbGUDYd (ORCPT ); Mon, 20 Jul 2015 23:24:33 -0400 Received: from e17.ny.us.ibm.com ([129.33.205.207]:51272 "EHLO e17.ny.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751268AbbGUDYb (ORCPT ); Mon, 20 Jul 2015 23:24:31 -0400 X-Helo: d01dlp03.pok.ibm.com X-MailFrom: paulmck@linux.vnet.ibm.com X-RcptTo: linux-kernel@vger.kernel.org Date: Mon, 20 Jul 2015 20:24:22 -0700 From: "Paul E. McKenney" To: Joe Perches 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 Subject: Re: [PATCH tip/core/rcu 15/16] scripts: Make checkpatch.pl warn on expedited RCU grace periods Message-ID: <20150721032422.GS3717@linux.vnet.ibm.com> Reply-To: paulmck@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> <1437443883.28284.8.camel@perches.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1437443883.28284.8.camel@perches.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15072103-0041-0000-0000-000000DFA5AE Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 20, 2015 at 06:58:03PM -0700, Joe Perches wrote: > 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 Got it, thank you! Thanx, Paul