All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Cc: 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,
	rostedt@goodmis.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: Fri, 17 Jul 2015 15:37:54 -0700	[thread overview]
Message-ID: <1437172674.2495.60.camel@perches.com> (raw)
In-Reply-To: <1437171616-13832-15-git-send-email-paulmck@linux.vnet.ibm.com>

On Fri, 2015-07-17 at 15:20 -0700, Paul E. McKenney wrote:
> The synchronize_rcu_expedited() and synchronize_sched_expedited()
> expedited-grace-period primitives induce OS jitter, which can degrade
> real-time response.  This commit therefore adds a checkpatch.pl warning
> on any patch adding them.
[]
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
[]
> +# Check for expedited grace periods that interrupt non-idle non-nohz
> +# online CPUs.  These expedited can therefore degrade real-time response
> +# if used carelessly, and should be avoided where not absolutely
> +# needed.  It is always OK to use synchronize_rcu_expedited() and
> +# synchronize_sched_expedited() at boot time (before real-time applications
> +# start) and in error situations where real-time response is compromised in
> +# any case.  Note that synchronize_srcu_expedited() does -not- interrupt
> +# other CPUs, so don't warn on uses of synchronize_srcu_expedited().
> +# Of course, nothing comes for free, and srcu_read_lock() and
> +# srcu_read_unlock() do contain full memory barriers in payment for
> +# synchronize_srcu_expedited() non-interruption properties.
> +		if ($line =~ /\b(synchronize_rcu_expedited|synchronize_sched_expedited)\(/) {

It'd be faster perl without capture groups:

		if ($line =~ /\b(?:synchronize_(?:rcu|sched)_expedited)\s*\(/) {

> +			WARN("EXPEDITED_RCU_GRACE_PERIOD",
> +			     "expedited RCU grace periods should be avoided in cases where they can degrade real-time response\n" . $herecurr);

"in cases" is rather redundant.



  reply	other threads:[~2015-07-17 22:38 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 [this message]
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
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=1437172674.2495.60.camel@perches.com \
    --to=joe@perches.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=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=paulmck@linux.vnet.ibm.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.