Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+19 -3
+10 -2
Documentation/RCU/Design/Requirements/Requirements.html
··· 1 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 3 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 4 4 "http://www.w3.org/TR/html4/loose.dtd"> 5 5 <html> ··· 1957 1957 in the middle of an outermost RCU read-side critical section unless either 1958 1958 (1)&nbsp;it releases them before exiting that same 1959 1959 RCU read-side critical section, or 1960 - (2)&nbsp;preemption is disabled across 1960 + (2)&nbsp;interrupts are disabled across 1961 1961 that entire RCU read-side critical section. 1962 1962 This same prohibition also applies (recursively!) to any lock that is acquired 1963 1963 while holding any lock to which this prohibition applies. 1964 1964 Adhering to this rule prevents preemptible RCU from invoking 1965 1965 <tt>rcu_read_unlock_special()</tt> while either runqueue or 1966 1966 priority-inheritance locks are held, thus avoiding deadlock. 1967 + 1968 + <p> 1969 + Prior to v4.4, it was only necessary to disable preemption across 1970 + RCU read-side critical sections that acquired scheduler locks. 1971 + In v4.4, expedited grace periods started using IPIs, and these 1972 + IPIs could force a <tt>rcu_read_unlock()</tt> to take the slowpath. 1973 + Therefore, this expedited-grace-period change required disabling of 1974 + interrupts, not just preemption. 1967 1975 1968 1976 <p> 1969 1977 For RCU's part, the preemptible-RCU <tt>rcu_read_unlock()</tt>
+9 -1
Documentation/RCU/Design/Requirements/Requirements.htmlx
··· 2124 2124 in the middle of an outermost RCU read-side critical section unless either 2125 2125 (1)&nbsp;it releases them before exiting that same 2126 2126 RCU read-side critical section, or 2127 - (2)&nbsp;preemption is disabled across 2127 + (2)&nbsp;interrupts are disabled across 2128 2128 that entire RCU read-side critical section. 2129 2129 This same prohibition also applies (recursively!) to any lock that is acquired 2130 2130 while holding any lock to which this prohibition applies. 2131 2131 Adhering to this rule prevents preemptible RCU from invoking 2132 2132 <tt>rcu_read_unlock_special()</tt> while either runqueue or 2133 2133 priority-inheritance locks are held, thus avoiding deadlock. 2134 + 2135 + <p> 2136 + Prior to v4.4, it was only necessary to disable preemption across 2137 + RCU read-side critical sections that acquired scheduler locks. 2138 + In v4.4, expedited grace periods started using IPIs, and these 2139 + IPIs could force a <tt>rcu_read_unlock()</tt> to take the slowpath. 2140 + Therefore, this expedited-grace-period change required disabling of 2141 + interrupts, not just preemption. 2134 2142 2135 2143 <p> 2136 2144 For RCU's part, the preemptible-RCU <tt>rcu_read_unlock()</tt>