Skip to content

Commit 089254f

Browse files
committed
rcu: Document reason for rcu_all_qs() call to preempt_disable()
Given that rcu_all_qs() is in non-preemptible kernels, why on earth should it invoke preempt_disable()? This commit adds the reason, which is to work nicely with debugging enabled in CONFIG_PREEMPT_COUNT=y kernels. Reported-by: Neeraj Upadhyay <quic_neeraju@quicinc.com> Reported-by: Boqun Feng <boqun.feng@gmail.com> Reported-by: Frederic Weisbecker <frederic@kernel.org> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
1 parent 6ca0292 commit 089254f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

kernel/rcu/tree_plugin.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -870,7 +870,7 @@ void rcu_all_qs(void)
870870

871871
if (!raw_cpu_read(rcu_data.rcu_urgent_qs))
872872
return;
873-
preempt_disable();
873+
preempt_disable(); // For CONFIG_PREEMPT_COUNT=y kernels
874874
/* Load rcu_urgent_qs before other flags. */
875875
if (!smp_load_acquire(this_cpu_ptr(&rcu_data.rcu_urgent_qs))) {
876876
preempt_enable();

0 commit comments

Comments
 (0)