linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@linux.ibm.com>
To: linux-kernel@vger.kernel.org
Cc: mingo@kernel.org, jiangshanlai@gmail.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,
	fweisbec@gmail.com, oleg@redhat.com, joel@joelfernandes.org,
	Zhouyi Zhou <zhouzhouyi@gmail.com>,
	"Paul E . McKenney" <paulmck@linux.ibm.com>
Subject: [PATCH tip/core/rcu 07/14] rcu: Adjust the comment of function rcu_is_watching
Date: Sun, 11 Nov 2018 11:28:57 -0800	[thread overview]
Message-ID: <20181111192904.3199-7-paulmck@linux.ibm.com> (raw)
In-Reply-To: <20181111192839.GA32144@linux.ibm.com>

From: Zhouyi Zhou <zhouzhouyi@gmail.com>

Because RCU avoids interrupting idle CPUs, rcu_is_watching() is used to
test whether or not it is currently legal to run RCU read-side critical
sections on this CPU.  However, the first sentence and last sentences
of current comment for rcu_is_watching have opposite meaning of what
is expected.  This commit therefore fixes this header comment.

Signed-off-by: Zhouyi Zhou <zhouzhouyi@gmail.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.ibm.com>
---
 kernel/rcu/tree.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index e7c9848d1e1b..429a46fb087a 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -904,12 +904,12 @@ void rcu_irq_enter_irqson(void)
 }
 
 /**
- * rcu_is_watching - see if RCU thinks that the current CPU is idle
+ * rcu_is_watching - see if RCU thinks that the current CPU is not idle
  *
  * Return true if RCU is watching the running CPU, which means that this
  * CPU can safely enter RCU read-side critical sections.  In other words,
- * if the current CPU is in its idle loop and is neither in an interrupt
- * or NMI handler, return true.
+ * if the current CPU is not in its idle loop or is in an interrupt or
+ * NMI handler, return true.
  */
 bool notrace rcu_is_watching(void)
 {
-- 
2.17.1


  parent reply	other threads:[~2018-11-11 19:30 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-11 19:28 [PATCH tip/core/rcu 0/14] Miscellaneous fixes for v4.21/v5.0 Paul E. McKenney
2018-11-11 19:28 ` [PATCH tip/core/rcu 01/14] rcu: Stop expedited grace periods from relying on stop-machine Paul E. McKenney
2018-11-11 19:28 ` [PATCH tip/core/rcu 02/14] MAINTAINERS: Update from @linux.vnet.ibm.com to @linux.ibm.com Paul E. McKenney
2018-11-11 19:28 ` [PATCH tip/core/rcu 03/14] rcu: Avoid double multiply by HZ Paul E. McKenney
2018-11-11 19:28 ` [PATCH tip/core/rcu 04/14] rcu: Parameterize rcu_check_gp_start_stall() Paul E. McKenney
2018-11-11 19:28 ` [PATCH tip/core/rcu 05/14] rcu: Add state name to show_rcu_gp_kthreads() output Paul E. McKenney
2018-11-11 19:28 ` [PATCH tip/core/rcu 06/14] rcu: Add jiffies-since-GP-activity to show_rcu_gp_kthreads() Paul E. McKenney
2018-11-11 19:28 ` Paul E. McKenney [this message]
2018-11-11 19:28 ` [PATCH tip/core/rcu 08/14] rcu: Trace end of grace period before end of grace period Paul E. McKenney
2018-11-11 19:28 ` [PATCH tip/core/rcu 09/14] rcu: Speed up expedited GPs when interrupting RCU reader Paul E. McKenney
2018-11-11 19:29 ` [PATCH tip/core/rcu 10/14] rcu: Replace this_cpu_ptr() with __this_cpu_read() Paul E. McKenney
2018-11-11 19:29 ` [PATCH tip/core/rcu 11/14] rcu: Avoid signed integer overflow in rcu_preempt_deferred_qs() Paul E. McKenney
2018-11-11 19:29 ` [PATCH tip/core/rcu 12/14] MAINTAINERS: Add Joel Fernandes as RCU reviewer Paul E. McKenney
2018-11-11 19:29 ` [PATCH tip/core/rcu 13/14] checkpatch: Create table of obsolete APIs and apply to RCU Paul E. McKenney
2018-11-11 19:29 ` [PATCH tip/core/rcu 14/14] checkpatch.pl: Suggest lockdep instead of asserting !spin_is_locked() 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=20181111192904.3199-7-paulmck@linux.ibm.com \
    --to=paulmck@linux.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=dhowells@redhat.com \
    --cc=dipankar@in.ibm.com \
    --cc=edumazet@google.com \
    --cc=fweisbec@gmail.com \
    --cc=jiangshanlai@gmail.com \
    --cc=joel@joelfernandes.org \
    --cc=josh@joshtriplett.org \
    --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 \
    --cc=zhouzhouyi@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).