Skip to content

Commit a6517e9

Browse files
Neeraj Upadhyaypaulmckrcu
authored andcommitted
rcu-tasks: Clarify read side section info for rcu_tasks_rude GP primitives
RCU tasks rude variant does not check whether the current running context on a CPU is usermode. Read side critical section ends on transition to usermode execution, by the virtue of usermode execution being schedulable. Clarify this in comments for call_rcu_tasks_rude() and synchronize_rcu_tasks_rude(). Signed-off-by: Neeraj Upadhyay <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]>
1 parent d39ec8f commit a6517e9

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

kernel/rcu/tasks.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -677,11 +677,11 @@ DEFINE_RCU_TASKS(rcu_tasks_rude, rcu_tasks_rude_wait_gp, call_rcu_tasks_rude,
677677
* period elapses, in other words after all currently executing RCU
678678
* read-side critical sections have completed. call_rcu_tasks_rude()
679679
* assumes that the read-side critical sections end at context switch,
680-
* cond_resched_rcu_qs(), or transition to usermode execution. As such,
681-
* there are no read-side primitives analogous to rcu_read_lock() and
682-
* rcu_read_unlock() because this primitive is intended to determine
683-
* that all tasks have passed through a safe state, not so much for
684-
* data-structure synchronization.
680+
* cond_resched_rcu_qs(), or transition to usermode execution (as
681+
* usermode execution is schedulable). As such, there are no read-side
682+
* primitives analogous to rcu_read_lock() and rcu_read_unlock() because
683+
* this primitive is intended to determine that all tasks have passed
684+
* through a safe state, not so much for data-structure synchronization.
685685
*
686686
* See the description of call_rcu() for more detailed information on
687687
* memory ordering guarantees.
@@ -699,8 +699,8 @@ EXPORT_SYMBOL_GPL(call_rcu_tasks_rude);
699699
* grace period has elapsed, in other words after all currently
700700
* executing rcu-tasks read-side critical sections have elapsed. These
701701
* read-side critical sections are delimited by calls to schedule(),
702-
* cond_resched_tasks_rcu_qs(), userspace execution, and (in theory,
703-
* anyway) cond_resched().
702+
* cond_resched_tasks_rcu_qs(), userspace execution (which is a schedulable
703+
* context), and (in theory, anyway) cond_resched().
704704
*
705705
* This is a very specialized primitive, intended only for a few uses in
706706
* tracing and other situations requiring manipulation of function preambles

0 commit comments

Comments
 (0)