rcu: Abstract sequence counting from synchronize_sched_expedited()
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Thu, 25 Jun 2015 22:00:58 +0000 (15:00 -0700)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Fri, 17 Jul 2015 21:58:51 +0000 (14:58 -0700)
commit28f00767e3db933cacc3030f4d9736acd037be2c
treecd49629a604b727bc8d871870e3bb27000907210
parent3a6d7c64d78a78d279851524d39999637a549363
rcu: Abstract sequence counting from synchronize_sched_expedited()

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: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
kernel/rcu/tree.c
This page took 0.025801 seconds and 5 git commands to generate.