Le Tue, Jul 14, 2026 at 11:48:08AM -0700, Paul E. McKenney a écrit :
> > I have similar concerns about the three smp_mb() in
> > get_state_synchronize_rcu_full(). It could be just two (rcu_seq_snap()
> > has a barrier that could be just one). Not sure if that matters but,
> > just wanted to point that.
> 
> We need the one at the beginning of get_state_synchronize_rcu_full(),
> but from what I can see, not the ones in the calls to rcu_seq_snap().
> I blame laziness.  We could make an rcu_seq_snap_no_ordering() that
> didn't have the smp_mb(), but I didn't believe that the overhead would
> be visible at the system level.

It isn't so much about performance than being clear about ordering
expectations. Though we could argue that grace period polling can be
about performance.

But in general rcu_seq_snap() advertizes:

   READ seq
   smp_mb() /* Above access must not bleed into critical section. */

This doesn't tell much. Which critical section? That's not used on
read side.

Thanks.

-- 
Frederic Weisbecker
SUSE Labs

Reply via email to