aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/RCU/Design/Requirements/Requirements.html44
1 files changed, 29 insertions, 15 deletions
diff --git a/Documentation/RCU/Design/Requirements/Requirements.html b/Documentation/RCU/Design/Requirements/Requirements.html
index f74a2233865c..9fca73e03a98 100644
--- a/Documentation/RCU/Design/Requirements/Requirements.html
+++ b/Documentation/RCU/Design/Requirements/Requirements.html
@@ -2475,23 +2475,37 @@ for context-switch-heavy <tt>CONFIG_NO_HZ_FULL=y</tt> workloads,
2475but there is room for further improvement. 2475but there is room for further improvement.
2476 2476
2477<p> 2477<p>
2478In the past, it was forbidden to disable interrupts across an 2478It is forbidden to hold any of scheduler's runqueue or priority-inheritance
2479<tt>rcu_read_unlock()</tt> unless that interrupt-disabled region 2479spinlocks across an <tt>rcu_read_unlock()</tt> unless interrupts have been
2480of code also included the matching <tt>rcu_read_lock()</tt>. 2480disabled across the entire RCU read-side critical section, that is,
2481Violating this restriction could result in deadlocks involving the 2481up to and including the matching <tt>rcu_read_lock()</tt>.
2482scheduler's runqueue and priority-inheritance spinlocks. 2482Violating this restriction can result in deadlocks involving these
2483This restriction was lifted when interrupt-disabled calls to 2483scheduler spinlocks.
2484<tt>rcu_read_unlock()</tt> started deferring the reporting of 2484There was hope that this restriction might be lifted when interrupt-disabled
2485the resulting RCU-preempt quiescent state until the end of that 2485calls to <tt>rcu_read_unlock()</tt> started deferring the reporting of
2486the resulting RCU-preempt quiescent state until the end of the corresponding
2486interrupts-disabled region. 2487interrupts-disabled region.
2487This deferred reporting means that the scheduler's runqueue and 2488Unfortunately, timely reporting of the corresponding quiescent state
2488priority-inheritance locks cannot be held while reporting an RCU-preempt 2489to expedited grace periods requires a call to <tt>raise_softirq()</tt>,
2489quiescent state, which lifts the earlier restriction, at least from 2490which can acquire these scheduler spinlocks.
2490a deadlock perspective. 2491In addition, real-time systems using RCU priority boosting
2491Unfortunately, real-time systems using RCU priority boosting may
2492need this restriction to remain in effect because deferred 2492need this restriction to remain in effect because deferred
2493quiescent-state reporting also defers deboosting, which in turn 2493quiescent-state reporting would also defer deboosting, which in turn
2494degrades real-time latencies. 2494would degrade real-time latencies.
2495
2496<p>
2497In theory, if a given RCU read-side critical section could be
2498guaranteed to be less than one second in duration, holding a scheduler
2499spinlock across that critical section's <tt>rcu_read_unlock()</tt>
2500would require only that preemption be disabled across the entire
2501RCU read-side critical section, not interrupts.
2502Unfortunately, given the possibility of vCPU preemption, long-running
2503interrupts, and so on, it is not possible in practice to guarantee
2504that a given RCU read-side critical section will complete in less than
2505one second.
2506Therefore, as noted above, if scheduler spinlocks are held across
2507a given call to <tt>rcu_read_unlock()</tt>, interrupts must be
2508disabled across the entire RCU read-side critical section.
2495 2509
2496<h3><a name="Tracing and RCU">Tracing and RCU</a></h3> 2510<h3><a name="Tracing and RCU">Tracing and RCU</a></h3>
2497 2511