Skip to content

Commit 4b9432e

Browse files
Frederic WeisbeckerNeeraj Upadhyay (AMD)
authored andcommitted
rcu/exp: Remove confusing needless full barrier on task unblock
A full memory barrier in the RCU-PREEMPT task unblock path advertizes to order the context switch (or rather the accesses prior to rcu_read_unlock()) with the expedited grace period fastpath. However the grace period can not complete without the rnp calling into rcu_report_exp_rnp() with the node locked. This reports the quiescent state in a fully ordered fashion against updater's accesses thanks to: 1) The READ-SIDE smp_mb__after_unlock_lock() barrier across nodes locking while propagating QS up to the root. 2) The UPDATE-SIDE smp_mb__after_unlock_lock() barrier while holding the the root rnp to wait/check for the GP completion. 3) The (perhaps redundant given step 1) and 2)) smp_mb() in rcu_seq_end() before the grace period completes. This makes the explicit barrier in this place superfluous. Therefore remove it as it is confusing. Acked-by: Paul E. McKenney <[email protected]> Signed-off-by: Frederic Weisbecker <[email protected]> Signed-off-by: Joel Fernandes <[email protected]> Signed-off-by: Neeraj Upadhyay (AMD) <[email protected]>
1 parent f2e555f commit 4b9432e

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

kernel/rcu/tree_plugin.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,6 @@ rcu_preempt_deferred_qs_irqrestore(struct task_struct *t, unsigned long flags)
534534
WARN_ON_ONCE(rnp->completedqs == rnp->gp_seq &&
535535
(!empty_norm || rnp->qsmask));
536536
empty_exp = sync_rcu_exp_done(rnp);
537-
smp_mb(); /* ensure expedited fastpath sees end of RCU c-s. */
538537
np = rcu_next_node_entry(t, rnp);
539538
list_del_init(&t->rcu_node_entry);
540539
t->rcu_blocked_node = NULL;

0 commit comments

Comments
 (0)