diff options
author | Ryo Takakura <takakura@valinux.co.jp> | 2024-06-28 13:18:26 +0900 |
---|---|---|
committer | Neeraj Upadhyay <neeraj.upadhyay@kernel.org> | 2024-08-15 00:10:50 +0530 |
commit | 51b739990cc81316768b85db519eac3999ba92a9 (patch) | |
tree | 7c23bbaf926a049a908d023da48d539590b710b0 /kernel/rcu | |
parent | 7c72dedb0079e62c1c75dbab038332017f34a6b8 (diff) | |
download | linux-stable-51b739990cc81316768b85db519eac3999ba92a9.tar.gz linux-stable-51b739990cc81316768b85db519eac3999ba92a9.tar.bz2 linux-stable-51b739990cc81316768b85db519eac3999ba92a9.zip |
rcu: Let dump_cpu_task() be used without preemption disabled
The commit 2d7f00b2f0130 ("rcu: Suppress smp_processor_id() complaint
in synchronize_rcu_expedited_wait()") disabled preemption around
dump_cpu_task() to suppress warning on its usage within preemtible context.
Calling dump_cpu_task() doesn't required to be in non-preemptible context
except for suppressing the smp_processor_id() warning.
As the smp_processor_id() is evaluated along with in_hardirq()
to check if it's in interrupt context, this patch removes the need
for its preemtion disablement by reordering the condition so that
smp_processor_id() only gets evaluated when it's in interrupt context.
Signed-off-by: Ryo Takakura <takakura@valinux.co.jp>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Signed-off-by: Neeraj Upadhyay <neeraj.upadhyay@kernel.org>
Diffstat (limited to 'kernel/rcu')
-rw-r--r-- | kernel/rcu/tree_exp.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/kernel/rcu/tree_exp.h b/kernel/rcu/tree_exp.h index d4be644afb50..c5d9a7eb0803 100644 --- a/kernel/rcu/tree_exp.h +++ b/kernel/rcu/tree_exp.h @@ -597,9 +597,7 @@ static void synchronize_rcu_expedited_stall(unsigned long jiffies_start, unsigne mask = leaf_node_cpu_bit(rnp, cpu); if (!(READ_ONCE(rnp->expmask) & mask)) continue; - preempt_disable(); // For smp_processor_id() in dump_cpu_task(). dump_cpu_task(cpu); - preempt_enable(); } rcu_exp_print_detail_task_stall_rnp(rnp); } |