• Paul E. McKenney's avatar
    rcu: Abstract sequence counting from synchronize_sched_expedited() · 28f00767
    Paul E. McKenney authored
    This commit creates rcu_exp_gp_seq_start() and rcu_exp_gp_seq_end() to
    bracket an expedited grace period, rcu_exp_gp_seq_snap() to snapshot the
    sequence counter, and rcu_exp_gp_seq_done() to check to see if a full
    expedited grace period has elapsed since the snapshot.  These will be
    applied to synchronize_rcu_expedited().  These are defined in terms of
    underlying rcu_seq_start(), rcu_seq_end(), rcu_seq_snap(), rcu_seq_done(),
    which will be applied to _rcu_barrier().
    
    One reason that this commit doesn't use the seqcount primitives themselves
    is that the smp_wmb() in those primitive is insufficient due to the fact
    that expedited grace periods do reads as well as writes.  In addition,
    the read-side seqcount primitives detect a potentially partial change,
    where the expedited primitives instead need a guaranteed full change.
    Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
    28f00767
tree.c 130 KB