Skip to content

Commit 2c00e11

Browse files
terminusfbq
authored andcommitted
sched: update __cond_resched comment about RCU quiescent states
Update comment in __cond_resched() clarifying how urgently needed quiescent state are provided. Signed-off-by: Ankur Arora <ankur.a.arora@oracle.com> Reviewed-by: Frederic Weisbecker <frederic@kernel.org> Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
1 parent 4dca1af commit 2c00e11

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

kernel/sched/core.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7289,7 +7289,7 @@ int __sched __cond_resched(void)
72897289
return 1;
72907290
}
72917291
/*
7292-
* In preemptible kernels, ->rcu_read_lock_nesting tells the tick
7292+
* In PREEMPT_RCU kernels, ->rcu_read_lock_nesting tells the tick
72937293
* whether the current CPU is in an RCU read-side critical section,
72947294
* so the tick can report quiescent states even for CPUs looping
72957295
* in kernel context. In contrast, in non-preemptible kernels,
@@ -7298,6 +7298,8 @@ int __sched __cond_resched(void)
72987298
* RCU quiescent state. Therefore, the following code causes
72997299
* cond_resched() to report a quiescent state, but only when RCU
73007300
* is in urgent need of one.
7301+
* A third case, preemptible, but non-PREEMPT_RCU provides for
7302+
* urgently needed quiescent states via rcu_flavor_sched_clock_irq().
73017303
*/
73027304
#ifndef CONFIG_PREEMPT_RCU
73037305
rcu_all_qs();

0 commit comments

Comments
 (0)