Skip to content

Commit 7562eed

Browse files
Frederic WeisbeckerNeeraj Upadhyay
authored andcommitted
rcu/nocb: Remove superfluous memory barrier after bypass enqueue
Pre-GP accesses performed by the update side must be ordered against post-GP accesses performed by the readers. This is ensured by the bypass or nocb locking on enqueue time, followed by the fully ordered rnp locking initiated while callbacks are accelerated, and then propagated throughout the whole GP lifecyle associated with the callbacks. Therefore the explicit barrier advertizing ordering between bypass enqueue and rcuo wakeup is superfluous. If anything, it would even only order the first bypass callback enqueue against the rcuo wakeup and ignore all the subsequent ones. Remove the needless barrier. Signed-off-by: Frederic Weisbecker <[email protected]> Signed-off-by: Neeraj Upadhyay <[email protected]>
1 parent 1b022b8 commit 7562eed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/rcu/tree_nocb.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ static bool rcu_nocb_try_bypass(struct rcu_data *rdp, struct rcu_head *rhp,
493493
trace_rcu_nocb_wake(rcu_state.name, rdp->cpu, TPS("FirstBQ"));
494494
}
495495
rcu_nocb_bypass_unlock(rdp);
496-
smp_mb(); /* Order enqueue before wake. */
496+
497497
// A wake up of the grace period kthread or timer adjustment
498498
// needs to be done only if:
499499
// 1. Bypass list was fully empty before (this is the first

0 commit comments

Comments
 (0)