Skip to content

Commit

Permalink
rcu: Simplify rcu_report_dead() call to rcu_report_exp_rdp()
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
paulmckrcu committed Sep 13, 2021
1 parent 2caebef commit 768f5d5
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions kernel/rcu/tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -4294,9 +4294,7 @@ void rcu_report_dead(unsigned int cpu)
do_nocb_deferred_wakeup(rdp);

/* QS for any half-done expedited grace period. */
preempt_disable();
rcu_report_exp_rdp(this_cpu_ptr(&rcu_data));
preempt_enable();
rcu_report_exp_rdp(rdp);
rcu_preempt_deferred_qs(current);

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

0 comments on commit 768f5d5

Please sign in to comment.