summaryrefslogtreecommitdiffstats
path: root/Documentation/RCU
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>2015-11-07 02:05:32 -0500
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2015-12-05 15:34:32 -0500
commitc64c4b0f9a183e4c73abff848378afa6edf796c5 (patch)
treebd0fa2e58b367e35dae47101ebd0de4b28642e9c /Documentation/RCU
parent4b689330b1a5858e88831b3752e9a6692a5c7bdb (diff)
documentation: Update RCU requirements based on expedited changes
Because RCU-sched expedited grace periods now use IPIs and interact with rcu_read_unlock(), it is no longer sufficient to disable preemption across RCU read-side critical sections that acquire and hold scheduler locks. It is now necessary to instead disable interrupts. This commit documents this change. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'Documentation/RCU')
-rw-r--r--Documentation/RCU/Design/Requirements/Requirements.html12
-rw-r--r--Documentation/RCU/Design/Requirements/Requirements.htmlx10
2 files changed, 19 insertions, 3 deletions
diff --git a/Documentation/RCU/Design/Requirements/Requirements.html b/Documentation/RCU/Design/Requirements/Requirements.html
index 96cdcf7195d5..a725f9900ec8 100644
--- a/Documentation/RCU/Design/Requirements/Requirements.html
+++ b/Documentation/RCU/Design/Requirements/Requirements.html
@@ -1,5 +1,5 @@
1<!-- DO NOT HAND EDIT. --> 1<!-- DO NOT HAND EDIT. -->
2<!-- Instead, edit Requirements.htmlx and run 'sh htmlqqz.sh Requirements' --> 2<!-- Instead, edit Documentation/RCU/Design/Requirements/Requirements.htmlx and run 'sh htmlqqz.sh Documentation/RCU/Design/Requirements/Requirements' -->
3<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 3<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
4 "http://www.w3.org/TR/html4/loose.dtd"> 4 "http://www.w3.org/TR/html4/loose.dtd">
5 <html> 5 <html>
@@ -1957,7 +1957,7 @@ the runqueue locks and the priority-inheritance locks
1957in the middle of an outermost RCU read-side critical section unless either 1957in the middle of an outermost RCU read-side critical section unless either
1958(1)&nbsp;it releases them before exiting that same 1958(1)&nbsp;it releases them before exiting that same
1959RCU read-side critical section, or 1959RCU read-side critical section, or
1960(2)&nbsp;preemption is disabled across 1960(2)&nbsp;interrupts are disabled across
1961that entire RCU read-side critical section. 1961that entire RCU read-side critical section.
1962This same prohibition also applies (recursively!) to any lock that is acquired 1962This same prohibition also applies (recursively!) to any lock that is acquired
1963while holding any lock to which this prohibition applies. 1963while holding any lock to which this prohibition applies.
@@ -1966,6 +1966,14 @@ Adhering to this rule prevents preemptible RCU from invoking
1966priority-inheritance locks are held, thus avoiding deadlock. 1966priority-inheritance locks are held, thus avoiding deadlock.
1967 1967
1968<p> 1968<p>
1969Prior to v4.4, it was only necessary to disable preemption across
1970RCU read-side critical sections that acquired scheduler locks.
1971In v4.4, expedited grace periods started using IPIs, and these
1972IPIs could force a <tt>rcu_read_unlock()</tt> to take the slowpath.
1973Therefore, this expedited-grace-period change required disabling of
1974interrupts, not just preemption.
1975
1976<p>
1969For RCU's part, the preemptible-RCU <tt>rcu_read_unlock()</tt> 1977For RCU's part, the preemptible-RCU <tt>rcu_read_unlock()</tt>
1970implementation must be written carefully to avoid similar deadlocks. 1978implementation must be written carefully to avoid similar deadlocks.
1971In particular, <tt>rcu_read_unlock()</tt> must tolerate an 1979In particular, <tt>rcu_read_unlock()</tt> must tolerate an
diff --git a/Documentation/RCU/Design/Requirements/Requirements.htmlx b/Documentation/RCU/Design/Requirements/Requirements.htmlx
index 2d0cd90987f6..3a97ba490c42 100644
--- a/Documentation/RCU/Design/Requirements/Requirements.htmlx
+++ b/Documentation/RCU/Design/Requirements/Requirements.htmlx
@@ -2124,7 +2124,7 @@ the runqueue locks and the priority-inheritance locks
2124in the middle of an outermost RCU read-side critical section unless either 2124in the middle of an outermost RCU read-side critical section unless either
2125(1)&nbsp;it releases them before exiting that same 2125(1)&nbsp;it releases them before exiting that same
2126RCU read-side critical section, or 2126RCU read-side critical section, or
2127(2)&nbsp;preemption is disabled across 2127(2)&nbsp;interrupts are disabled across
2128that entire RCU read-side critical section. 2128that entire RCU read-side critical section.
2129This same prohibition also applies (recursively!) to any lock that is acquired 2129This same prohibition also applies (recursively!) to any lock that is acquired
2130while holding any lock to which this prohibition applies. 2130while holding any lock to which this prohibition applies.
@@ -2133,6 +2133,14 @@ Adhering to this rule prevents preemptible RCU from invoking
2133priority-inheritance locks are held, thus avoiding deadlock. 2133priority-inheritance locks are held, thus avoiding deadlock.
2134 2134
2135<p> 2135<p>
2136Prior to v4.4, it was only necessary to disable preemption across
2137RCU read-side critical sections that acquired scheduler locks.
2138In v4.4, expedited grace periods started using IPIs, and these
2139IPIs could force a <tt>rcu_read_unlock()</tt> to take the slowpath.
2140Therefore, this expedited-grace-period change required disabling of
2141interrupts, not just preemption.
2142
2143<p>
2136For RCU's part, the preemptible-RCU <tt>rcu_read_unlock()</tt> 2144For RCU's part, the preemptible-RCU <tt>rcu_read_unlock()</tt>
2137implementation must be written carefully to avoid similar deadlocks. 2145implementation must be written carefully to avoid similar deadlocks.
2138In particular, <tt>rcu_read_unlock()</tt> must tolerate an 2146In particular, <tt>rcu_read_unlock()</tt> must tolerate an