]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
rcu: Let dump_cpu_task() be used without preemption disabled
authorRyo Takakura <takakura@valinux.co.jp>
Fri, 28 Jun 2024 04:18:26 +0000 (13:18 +0900)
committerNeeraj Upadhyay <neeraj.upadhyay@kernel.org>
Wed, 14 Aug 2024 18:40:50 +0000 (00:10 +0530)
commit51b739990cc81316768b85db519eac3999ba92a9
tree7c23bbaf926a049a908d023da48d539590b710b0
parent7c72dedb0079e62c1c75dbab038332017f34a6b8
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>
kernel/rcu/tree_exp.h
kernel/sched/core.c