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