From: Joel Fernandes <joel@joelfernandes.org>
To: "Paul E. McKenney" <paulmck@linux.ibm.com>
Cc: linux-kernel@vger.kernel.org, tytso@mit.edu,
Jonathan Corbet <corbet@lwn.net>,
Josh Triplett <josh@joshtriplett.org>,
Lai Jiangshan <jiangshanlai@gmail.com>,
linux-doc@vger.kernel.org,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Steven Rostedt <rostedt@goodmis.org>
Subject: Re: [PATCH] docs: rcu: Make reader aware of rcu_dereference_protected
Date: Tue, 9 Oct 2018 21:01:59 -0700 [thread overview]
Message-ID: <20181010040159.GA90259@joelaf.mtv.corp.google.com> (raw)
In-Reply-To: <20181010030906.GB2674@linux.ibm.com>
On Tue, Oct 09, 2018 at 08:09:06PM -0700, Paul E. McKenney wrote:
> On Mon, Oct 08, 2018 at 06:33:41PM -0700, Joel Fernandes (Google) wrote:
> > whatisRCU says rcu_dereference cannot be used outside of rcu read lock
> > protected sections. Its better to mention rcu_dereference_protected when
> > it says that, so that the new reader is aware of this API and is not led
> > to believing that all RCU dereferences in all situations have to be
> > protected by a rcu_read_lock() and rcu_read_unlock().
> >
> > Cc: tytso@mit.edu
> > Suggested-by: tytso@mit.edu
> > Signed-off-by: Joel Fernandes (Google) <joel@joelfernandes.org>
>
> Good stuff! I queued and pushed this with some wordsmithing. Could
> you please check for my having messed something up?
One small nit which the below diff should fix, but otherwise looks good to
me, thanks!
- Joel
----8<----
diff --git a/Documentation/RCU/whatisRCU.txt b/Documentation/RCU/whatisRCU.txt
index 38044c978e54..093b85ad49eb 100644
--- a/Documentation/RCU/whatisRCU.txt
+++ b/Documentation/RCU/whatisRCU.txt
@@ -297,7 +297,7 @@ rcu_dereference()
protected by locks acquired by the update-side code. This variant
avoids the lockdep warning that would happen when using (for
example) rcu_dereference() without rcu_read_lock() protection.
- Using rcu_dereference_protected() also have the advantage
+ Using rcu_dereference_protected() also has the advantage
of permitting compiler optimizations that rcu_dereference()
must prohibit. The rcu_dereference_protected() variant takes
a lockdep expression to indicate which locks must be acquired
next prev parent reply other threads:[~2018-10-10 4:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-09 1:33 Joel Fernandes (Google)
2018-10-10 3:09 ` Paul E. McKenney
2018-10-10 4:01 ` Joel Fernandes [this message]
2018-10-10 15:44 ` Paul E. McKenney
2018-10-10 19:09 ` Theodore Y. Ts'o
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=20181010040159.GA90259@joelaf.mtv.corp.google.com \
--to=joel@joelfernandes.org \
--cc=corbet@lwn.net \
--cc=jiangshanlai@gmail.com \
--cc=josh@joshtriplett.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=paulmck@linux.ibm.com \
--cc=rostedt@goodmis.org \
--cc=tytso@mit.edu \
/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
Powered by JetHome