All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@linux.ibm.com>
To: "Joel Fernandes (Google)" <joel@joelfernandes.org>
Cc: linux-kernel@vger.kernel.org, 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 RFC] doc: rcu: remove obsolete (non-)requirement about disabling preemption
Date: Sun, 14 Oct 2018 16:17:31 -0700	[thread overview]
Message-ID: <20181014231731.GN2674@linux.ibm.com> (raw)
In-Reply-To: <20181014212955.95267-1-joel@joelfernandes.org>

On Sun, Oct 14, 2018 at 02:29:55PM -0700, Joel Fernandes (Google) wrote:
> The Requirements.html document says "Disabling Preemption Does Not Block
> Grace Periods". However this is no longer true with the RCU
> consolidation. Lets remove the obsolete (non-)requirement entirely.
> 
> Signed-off-by: Joel Fernandes (Google) <joel@joelfernandes.org>

Good catch, queued, thank you!

							Thanx, Paul

> ---
>  .../RCU/Design/Requirements/Requirements.html | 50 -------------------
>  1 file changed, 50 deletions(-)
> 
> diff --git a/Documentation/RCU/Design/Requirements/Requirements.html b/Documentation/RCU/Design/Requirements/Requirements.html
> index 7efc1c1da7af..4fae55056c1d 100644
> --- a/Documentation/RCU/Design/Requirements/Requirements.html
> +++ b/Documentation/RCU/Design/Requirements/Requirements.html
> @@ -900,8 +900,6 @@ Except where otherwise noted, these non-guarantees were premeditated.
>  	Grace Periods Don't Partition Read-Side Critical Sections</a>
>  <li>	<a href="#Read-Side Critical Sections Don't Partition Grace Periods">
>  	Read-Side Critical Sections Don't Partition Grace Periods</a>
> -<li>	<a href="#Disabling Preemption Does Not Block Grace Periods">
> -	Disabling Preemption Does Not Block Grace Periods</a>
>  </ol>
>  
>  <h3><a name="Readers Impose Minimal Ordering">Readers Impose Minimal Ordering</a></h3>
> @@ -1259,54 +1257,6 @@ of RCU grace periods.
>  <tr><td>&nbsp;</td></tr>
>  </table>
>  
> -<h3><a name="Disabling Preemption Does Not Block Grace Periods">
> -Disabling Preemption Does Not Block Grace Periods</a></h3>
> -
> -<p>
> -There was a time when disabling preemption on any given CPU would block
> -subsequent grace periods.
> -However, this was an accident of implementation and is not a requirement.
> -And in the current Linux-kernel implementation, disabling preemption
> -on a given CPU in fact does not block grace periods, as Oleg Nesterov
> -<a href="https://lkml.kernel.org/g/20150614193825.GA19582@redhat.com">demonstrated</a>.
> -
> -<p>
> -If you need a preempt-disable region to block grace periods, you need to add
> -<tt>rcu_read_lock()</tt> and <tt>rcu_read_unlock()</tt>, for example
> -as follows:
> -
> -<blockquote>
> -<pre>
> - 1 preempt_disable();
> - 2 rcu_read_lock();
> - 3 do_something();
> - 4 rcu_read_unlock();
> - 5 preempt_enable();
> - 6
> - 7 /* Spinlocks implicitly disable preemption. */
> - 8 spin_lock(&amp;mylock);
> - 9 rcu_read_lock();
> -10 do_something();
> -11 rcu_read_unlock();
> -12 spin_unlock(&amp;mylock);
> -</pre>
> -</blockquote>
> -
> -<p>
> -In theory, you could enter the RCU read-side critical section first,
> -but it is more efficient to keep the entire RCU read-side critical
> -section contained in the preempt-disable region as shown above.
> -Of course, RCU read-side critical sections that extend outside of
> -preempt-disable regions will work correctly, but such critical sections
> -can be preempted, which forces <tt>rcu_read_unlock()</tt> to do
> -more work.
> -And no, this is <i>not</i> an invitation to enclose all of your RCU
> -read-side critical sections within preempt-disable regions, because
> -doing so would degrade real-time response.
> -
> -<p>
> -This non-requirement appeared with preemptible RCU.
> -
>  <h2><a name="Parallelism Facts of Life">Parallelism Facts of Life</a></h2>
>  
>  <p>
> -- 
> 2.19.0.605.g01d371f741-goog
> 


  reply	other threads:[~2018-10-14 23:17 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-14 21:29 [PATCH RFC] doc: rcu: remove obsolete (non-)requirement about disabling preemption Joel Fernandes (Google)
2018-10-14 23:17 ` Paul E. McKenney [this message]
2018-10-15  2:08   ` Joel Fernandes
2018-10-15  2:13     ` Joel Fernandes
2018-10-15  2:33       ` Paul E. McKenney
2018-10-15  2:47         ` Joel Fernandes
2018-10-15  2:50           ` Joel Fernandes
2018-10-15  6:05           ` Nikolay Borisov
2018-10-15 11:21             ` Paul E. McKenney
2018-10-15 19:39               ` Joel Fernandes
2018-10-15 19:54                 ` Paul E. McKenney
2018-10-15 20:15                   ` Joel Fernandes
2018-10-15 21:08                     ` Paul E. McKenney
2018-10-16 11:26                       ` Paul E. McKenney
2018-10-16 20:41                         ` Joel Fernandes
2018-10-17 16:11                           ` Paul E. McKenney
2018-10-17 18:15                             ` Joel Fernandes
2018-10-17 20:33                               ` Paul E. McKenney
2018-10-18  2:07                                 ` Joel Fernandes
2018-10-18 14:46                                   ` Paul E. McKenney
2018-10-19  0:03                                     ` Joel Fernandes
2018-10-19  0:19                                       ` Paul E. McKenney
2018-10-19  1:12                                         ` Steven Rostedt
2018-10-19  1:27                                           ` Joel Fernandes
2018-10-19  1:26                                         ` Joel Fernandes
2018-10-19  1:50                                           ` Steven Rostedt
2018-10-19  2:25                                             ` Joel Fernandes
2018-10-19  2:52                                               ` Steven Rostedt
2018-10-19  3:58                                                 ` Joel Fernandes
2018-10-19 12:07                                                   ` Paul E. McKenney
2018-10-19 17:24                                                     ` Joel Fernandes
2018-10-19 18:11                                                       ` 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=20181014231731.GN2674@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 \
    /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.