rcu: Move __rcu_read_unlock()'s barrier() within if-statement
authorPaul E. McKenney <paul.mckenney@linaro.org>
Mon, 1 Aug 2011 13:22:11 +0000 (06:22 -0700)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Thu, 29 Sep 2011 04:38:35 +0000 (21:38 -0700)
commit6206ab9bab620fc0fbbed30ce20d145b0b3d1840
treeb57912ba9fff6f2deba89c0178d3122bbd1fda6e
parent6846c0c54074d47927c90eab4a805115e1ae3292
rcu: Move __rcu_read_unlock()'s barrier() within if-statement

We only need to constrain the compiler if we are actually exiting
the top-level RCU read-side critical section.  This commit therefore
moves the first barrier() cal in __rcu_read_unlock() to inside the
"if" statement, thus avoiding needless register flushes for inner
rcu_read_unlock() calls.

Signed-off-by: Paul E. McKenney <paul.mckenney@linaro.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
include/linux/rcupdate.h
kernel/rcutree_plugin.h