From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757548AbbGUB3o (ORCPT ); Mon, 20 Jul 2015 21:29:44 -0400 Received: from e36.co.us.ibm.com ([32.97.110.154]:48815 "EHLO e36.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757452AbbGUB3n (ORCPT ); Mon, 20 Jul 2015 21:29:43 -0400 X-Helo: d03dlp03.boulder.ibm.com X-MailFrom: paulmck@linux.vnet.ibm.com X-RcptTo: linux-kernel@vger.kernel.org Date: Mon, 20 Jul 2015 18:29:36 -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: <20150721012936.GQ3717@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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1437440779.28284.7.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: 15072101-0021-0000-0000-00000E92F559 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? Thanx, Paul