From: "Paul E. McKenney" <paulmck@linux.ibm.com>
To: Joel Fernandes <joel@joelfernandes.org>
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: Wed, 10 Oct 2018 08:44:14 -0700 [thread overview]
Message-ID: <20181010154414.GC2674@linux.ibm.com> (raw)
In-Reply-To: <20181010040159.GA90259@joelaf.mtv.corp.google.com>
On Tue, Oct 09, 2018 at 09:01:59PM -0700, Joel Fernandes wrote:
> 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!
Good catch! I rolled the into the commit, thank you!
Thanx, Paul
> - 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 15:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-09 1:33 [PATCH] docs: rcu: Make reader aware of rcu_dereference_protected Joel Fernandes (Google)
2018-10-10 3:09 ` Paul E. McKenney
2018-10-10 4:01 ` Joel Fernandes
2018-10-10 15:44 ` Paul E. McKenney [this message]
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=20181010154414.GC2674@linux.ibm.com \
--to=paulmck@linux.ibm.com \
--cc=corbet@lwn.net \
--cc=jiangshanlai@gmail.com \
--cc=joel@joelfernandes.org \
--cc=josh@joshtriplett.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.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 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.