Skip to content

Commit 768f5d5

Browse files
committed
rcu: Simplify rcu_report_dead() call to rcu_report_exp_rdp()
Currently, rcu_report_dead() disables preemption across its call to rcu_report_exp_rdp(), but this is pointless because interrupts are already disabled by the caller. In addition, rcu_report_dead() computes the address of the outgoing CPU's rcu_data structure, which is also pointless because this address is already present in local variable rdp. This commit therefore drops the preemption disabling and passes rdp to rcu_report_exp_rdp(). Signed-off-by: Paul E. McKenney <[email protected]>
1 parent 2caebef commit 768f5d5

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

kernel/rcu/tree.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4294,9 +4294,7 @@ void rcu_report_dead(unsigned int cpu)
42944294
do_nocb_deferred_wakeup(rdp);
42954295

42964296
/* QS for any half-done expedited grace period. */
4297-
preempt_disable();
4298-
rcu_report_exp_rdp(this_cpu_ptr(&rcu_data));
4299-
preempt_enable();
4297+
rcu_report_exp_rdp(rdp);
43004298
rcu_preempt_deferred_qs(current);
43014299

43024300
/* Remove outgoing CPU from mask in the leaf rcu_node structure. */

0 commit comments

Comments
 (0)