aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/RCU/Design/Expedited-Grace-Periods/Expedited-Grace-Periods.html47
1 files changed, 44 insertions, 3 deletions
diff --git a/Documentation/RCU/Design/Expedited-Grace-Periods/Expedited-Grace-Periods.html b/Documentation/RCU/Design/Expedited-Grace-Periods/Expedited-Grace-Periods.html
index 7a3194c5559a..e5d0bbd0230b 100644
--- a/Documentation/RCU/Design/Expedited-Grace-Periods/Expedited-Grace-Periods.html
+++ b/Documentation/RCU/Design/Expedited-Grace-Periods/Expedited-Grace-Periods.html
@@ -284,6 +284,7 @@ Expedited Grace Period Refinements</a></h2>
284 Funnel locking and wait/wakeup</a>. 284 Funnel locking and wait/wakeup</a>.
285<li> <a href="#Use of Workqueues">Use of Workqueues</a>. 285<li> <a href="#Use of Workqueues">Use of Workqueues</a>.
286<li> <a href="#Stall Warnings">Stall warnings</a>. 286<li> <a href="#Stall Warnings">Stall warnings</a>.
287<li> <a href="#Mid-Boot Operation">Mid-boot operation</a>.
287</ol> 288</ol>
288 289
289<h3><a name="Idle-CPU Checks">Idle-CPU Checks</a></h3> 290<h3><a name="Idle-CPU Checks">Idle-CPU Checks</a></h3>
@@ -524,7 +525,7 @@ their grace periods and carrying out their wakeups.
524In earlier implementations, the task requesting the expedited 525In earlier implementations, the task requesting the expedited
525grace period also drove it to completion. 526grace period also drove it to completion.
526This straightforward approach had the disadvantage of needing to 527This straightforward approach had the disadvantage of needing to
527account for signals sent to user tasks, 528account for POSIX signals sent to user tasks,
528so more recent implemementations use the Linux kernel's 529so more recent implemementations use the Linux kernel's
529<a href="https://www.kernel.org/doc/Documentation/workqueue.txt">workqueues</a>. 530<a href="https://www.kernel.org/doc/Documentation/workqueue.txt">workqueues</a>.
530 531
@@ -533,8 +534,8 @@ The requesting task still does counter snapshotting and funnel-lock
533processing, but the task reaching the top of the funnel lock 534processing, but the task reaching the top of the funnel lock
534does a <tt>schedule_work()</tt> (from <tt>_synchronize_rcu_expedited()</tt> 535does a <tt>schedule_work()</tt> (from <tt>_synchronize_rcu_expedited()</tt>
535so that a workqueue kthread does the actual grace-period processing. 536so that a workqueue kthread does the actual grace-period processing.
536Because workqueue kthreads do not accept signals, grace-period-wait 537Because workqueue kthreads do not accept POSIX signals, grace-period-wait
537processing need not allow for signals. 538processing need not allow for POSIX signals.
538 539
539In addition, this approach allows wakeups for the previous expedited 540In addition, this approach allows wakeups for the previous expedited
540grace period to be overlapped with processing for the next expedited 541grace period to be overlapped with processing for the next expedited
@@ -586,6 +587,46 @@ blocking the current grace period are printed.
586Each stall warning results in another pass through the loop, but the 587Each stall warning results in another pass through the loop, but the
587second and subsequent passes use longer stall times. 588second and subsequent passes use longer stall times.
588 589
590<h3><a name="Mid-Boot Operation">Mid-boot operation</a></h3>
591
592<p>
593The use of workqueues has the advantage that the expedited
594grace-period code need not worry about POSIX signals.
595Unfortunately, it has the
596corresponding disadvantage that workqueues cannot be used until
597they are initialized, which does not happen until some time after
598the scheduler spawns the first task.
599Given that there are parts of the kernel that really do want to
600execute grace periods during this mid-boot &ldquo;dead zone&rdquo;,
601expedited grace periods must do something else during thie time.
602
603<p>
604What they do is to fall back to the old practice of requiring that the
605requesting task drive the expedited grace period, as was the case
606before the use of workqueues.
607However, the requesting task is only required to drive the grace period
608during the mid-boot dead zone.
609Before mid-boot, a synchronous grace period is a no-op.
610Some time after mid-boot, workqueues are used.
611
612<p>
613Non-expedited non-SRCU synchronous grace periods must also operate
614normally during mid-boot.
615This is handled by causing non-expedited grace periods to take the
616expedited code path during mid-boot.
617
618<p>
619The current code assumes that there are no POSIX signals during
620the mid-boot dead zone.
621However, if an overwhelming need for POSIX signals somehow arises,
622appropriate adjustments can be made to the expedited stall-warning code.
623One such adjustment would reinstate the pre-workqueue stall-warning
624checks, but only during the mid-boot dead zone.
625
626<p>
627With this refinement, synchronous grace periods can now be used from
628task context pretty much any time during the life of the kernel.
629
589<h3><a name="Summary"> 630<h3><a name="Summary">
590Summary</a></h3> 631Summary</a></h3>
591 632