Skip to content

Commit 293d901

Browse files
committed
doc: Update Tasks RCU and Tasks Rude RCU description in Requirements.rst
This commit adds more detail to the Tasks RCU and Tasks Rude RCU descriptions in Requirements.rst. While in the area, add Tasks Trace RCU to the Tasks-RCU table of contents. Reported-by: Sebastian Andrzej Siewior <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]> Reviewed-by: Frederic Weisbecker <[email protected]>
1 parent 1613e60 commit 293d901

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

Documentation/RCU/Design/Requirements/Requirements.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2357,6 +2357,7 @@ section.
23572357
#. `Sched Flavor (Historical)`_
23582358
#. `Sleepable RCU`_
23592359
#. `Tasks RCU`_
2360+
#. `Tasks Trace RCU`_
23602361

23612362
Bottom-Half Flavor (Historical)
23622363
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -2610,6 +2611,16 @@ critical sections that are delimited by voluntary context switches, that
26102611
is, calls to schedule(), cond_resched(), and
26112612
synchronize_rcu_tasks(). In addition, transitions to and from
26122613
userspace execution also delimit tasks-RCU read-side critical sections.
2614+
Idle tasks are ignored by Tasks RCU, and Tasks Rude RCU may be used to
2615+
interact with them.
2616+
2617+
Note well that involuntary context switches are *not* Tasks-RCU quiescent
2618+
states. After all, in preemptible kernels, a task executing code in a
2619+
trampoline might be preempted. In this case, the Tasks-RCU grace period
2620+
clearly cannot end until that task resumes and its execution leaves that
2621+
trampoline. This means, among other things, that cond_resched() does
2622+
not provide a Tasks RCU quiescent state. (Instead, use rcu_softirq_qs()
2623+
from softirq or rcu_tasks_classic_qs() otherwise.)
26132624

26142625
The tasks-RCU API is quite compact, consisting only of
26152626
call_rcu_tasks(), synchronize_rcu_tasks(), and
@@ -2632,6 +2643,11 @@ moniker. And this operation is considered to be quite rude by real-time
26322643
workloads that don't want their ``nohz_full`` CPUs receiving IPIs and
26332644
by battery-powered systems that don't want their idle CPUs to be awakened.
26342645

2646+
Once kernel entry/exit and deep-idle functions have been properly tagged
2647+
``noinstr``, Tasks RCU can start paying attention to idle tasks (except
2648+
those that are idle from RCU's perspective) and then Tasks Rude RCU can
2649+
be removed from the kernel.
2650+
26352651
The tasks-rude-RCU API is also reader-marking-free and thus quite compact,
26362652
consisting of call_rcu_tasks_rude(), synchronize_rcu_tasks_rude(),
26372653
and rcu_barrier_tasks_rude().

0 commit comments

Comments
 (0)