]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
rcu: Consolidate last open-coded expedited memory barrier
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Sat, 27 Jun 2015 16:36:29 +0000 (09:36 -0700)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Fri, 17 Jul 2015 21:58:59 +0000 (14:58 -0700)
commit704dd435ac7eaefa89fcd82fd2876b8330e00ff3
tree7b57a6ab5bed14ddbd1a58ed015c853d3a8b7a6c
parent4f525a528b9e75571c6bedc6202beff1ced24c32
rcu: Consolidate last open-coded expedited memory barrier

One of the requirements on RCU grace periods is that if there is a
causal chain of operations that starts after one grace period and
ends before another grace period, then the two grace periods must
be serialized.  There has been (and might still be) code that relies
on this, for example, certain types of reference-counting code that
does a call_rcu() within an RCU callback function.

This requirement is why there is an smp_mb() at the end of both
synchronize_sched_expedited() and synchronize_rcu_expedited().
However, this is the only smp_mb() in these functions, so it would
be nicer to consolidate it into rcu_exp_gp_seq_end().  This commit
does just that.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
kernel/rcu/tree.c
kernel/rcu/tree_plugin.h