Skip to content

Commit 1b7178b

Browse files
paulmckrcuneeraju
authored andcommitted
doc: Clarify RCU Tasks reader/updater checklist
Currently, the reader/updater compatibility rules for the three RCU Tasks flavors are squished together in a single paragraph, which can result in confusion. This commit therefore splits them out into a list, clearly showing the distinction between these flavors. Link: https://lore.kernel.org/all/20231002211936.5948253e@gandalf.local.home/ Reported-by: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Reviewed-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Reviewed-by: Steven Rostedt (Google) <rostedt@goodmis.org> Signed-off-by: Neeraj Upadhyay (AMD) <neeraj.iitr10@gmail.com>
1 parent 493dffa commit 1b7178b

File tree

1 file changed

+16
-9
lines changed

1 file changed

+16
-9
lines changed

Documentation/RCU/checklist.rst

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -241,15 +241,22 @@ over a rather long period of time, but improvements are always welcome!
241241
srcu_struct. The rules for the expedited RCU grace-period-wait
242242
primitives are the same as for their non-expedited counterparts.
243243

244-
If the updater uses call_rcu_tasks() or synchronize_rcu_tasks(),
245-
then the readers must refrain from executing voluntary
246-
context switches, that is, from blocking. If the updater uses
247-
call_rcu_tasks_trace() or synchronize_rcu_tasks_trace(), then
248-
the corresponding readers must use rcu_read_lock_trace() and
249-
rcu_read_unlock_trace(). If an updater uses call_rcu_tasks_rude()
250-
or synchronize_rcu_tasks_rude(), then the corresponding readers
251-
must use anything that disables preemption, for example,
252-
preempt_disable() and preempt_enable().
244+
Similarly, it is necessary to correctly use the RCU Tasks flavors:
245+
246+
a. If the updater uses synchronize_rcu_tasks() or
247+
call_rcu_tasks(), then the readers must refrain from
248+
executing voluntary context switches, that is, from
249+
blocking.
250+
251+
b. If the updater uses call_rcu_tasks_trace()
252+
or synchronize_rcu_tasks_trace(), then the
253+
corresponding readers must use rcu_read_lock_trace()
254+
and rcu_read_unlock_trace().
255+
256+
c. If an updater uses call_rcu_tasks_rude() or
257+
synchronize_rcu_tasks_rude(), then the corresponding
258+
readers must use anything that disables preemption,
259+
for example, preempt_disable() and preempt_enable().
253260

254261
Mixing things up will result in confusion and broken kernels, and
255262
has even resulted in an exploitable security issue. Therefore,

0 commit comments

Comments
 (0)