From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Joe Perches <joe@perches.com>
Cc: Steven Rostedt <rostedt@goodmis.org>,
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 <apw@canonical.com>
Subject: Re: [PATCH tip/core/rcu 15/16] scripts: Make checkpatch.pl warn on expedited RCU grace periods
Date: Mon, 20 Jul 2015 18:29:36 -0700 [thread overview]
Message-ID: <20150721012936.GQ3717@linux.vnet.ibm.com> (raw)
In-Reply-To: <1437440779.28284.7.camel@perches.com>
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 <joe@perches.com> 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_<foo>_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
next prev parent reply other threads:[~2015-07-21 1:29 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-17 22:19 [PATCH tip/core/rcu 0/16] Miscellaneous fixes for 4.3 Paul E. McKenney
2015-07-17 22:20 ` [PATCH tip/core/rcu 01/16] rcu: Drop RCU_USER_QS in favor of NO_HZ_FULL Paul E. McKenney
2015-07-17 22:20 ` [PATCH tip/core/rcu 02/16] rcu: Deinline rcu_read_lock_sched_held() if DEBUG_LOCK_ALLOC Paul E. McKenney
2015-07-17 22:20 ` [PATCH tip/core/rcu 03/16] rcu: Change return type to bool Paul E. McKenney
2015-07-17 22:20 ` [PATCH tip/core/rcu 04/16] rcu: Add RCU-sched flavors of get-state and cond-sync Paul E. McKenney
2015-07-17 22:20 ` [PATCH tip/core/rcu 05/16] rcu: Hide RCU_NOCB_CPU behind RCU_EXPERT Paul E. McKenney
2015-07-17 22:20 ` [PATCH tip/core/rcu 06/16] rcu: Use WRITE_ONCE in RCU_INIT_POINTER Paul E. McKenney
2015-07-17 22:20 ` [PATCH tip/core/rcu 07/16] rcu: Fix obsolete priority-boosting comment Paul E. McKenney
2015-07-17 22:20 ` [PATCH tip/core/rcu 08/16] rcu: Create a synchronize_rcu_mult() Paul E. McKenney
2015-07-17 22:20 ` [PATCH tip/core/rcu 09/16] cpu: Wait for RCU grace periods concurrently Paul E. McKenney
2015-07-17 22:20 ` [PATCH tip/core/rcu 10/16] rcu: Make rcu_is_watching() really notrace Paul E. McKenney
2015-07-17 22:20 ` [PATCH tip/core/rcu 11/16] rcu: Rename rcu_lockdep_assert() to RCU_LOCKDEP_WARN() Paul E. McKenney
2015-07-17 22:20 ` [PATCH tip/core/rcu 12/16] rcu: Fix backwards RCU_LOCKDEP_WARN() in synchronize_rcu_tasks() Paul E. McKenney
2015-07-17 22:20 ` [PATCH tip/core/rcu 13/16] rcu: Clarify CONFIG_RCU_EQS_DEBUG help text Paul E. McKenney
2015-07-17 22:20 ` [PATCH tip/core/rcu 14/16] rcu: update MAINTAINERS entry Paul E. McKenney
2015-07-17 22:20 ` [PATCH tip/core/rcu 15/16] scripts: Make checkpatch.pl warn on expedited RCU grace periods Paul E. McKenney
2015-07-17 22:37 ` Joe Perches
2015-07-21 0:41 ` Paul E. McKenney
2015-07-21 0:48 ` Joe Perches
2015-07-21 1:02 ` Paul E. McKenney
2015-07-21 0:55 ` Steven Rostedt
2015-07-21 1:06 ` Joe Perches
2015-07-21 1:15 ` Steven Rostedt
2015-07-21 17:18 ` Joe Perches
2015-07-21 20:11 ` Paul E. McKenney
2015-07-21 1:29 ` Paul E. McKenney [this message]
2015-07-21 1:58 ` Joe Perches
2015-07-21 3:24 ` Paul E. McKenney
2015-07-17 22:20 ` [PATCH tip/core/rcu 16/16] rcu: Don't disable CPU hotplug during OOM notifiers Paul E. McKenney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150721012936.GQ3717@linux.vnet.ibm.com \
--to=paulmck@linux.vnet.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=apw@canonical.com \
--cc=bobby.prani@gmail.com \
--cc=dhowells@redhat.com \
--cc=dipankar@in.ibm.com \
--cc=dvhart@linux.intel.com \
--cc=edumazet@google.com \
--cc=fweisbec@gmail.com \
--cc=joe@perches.com \
--cc=josh@joshtriplett.org \
--cc=laijs@cn.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mingo@kernel.org \
--cc=oleg@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.