summaryrefslogtreecommitdiff
path: root/include/linux/rcupdate.h
diff options
context:
space:
mode:
authorPaul E. McKenney <paul.mckenney@linaro.org>2011-08-01 06:22:11 -0700
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2011-09-28 21:38:35 -0700
commit6206ab9bab620fc0fbbed30ce20d145b0b3d1840 (patch)
treeb57912ba9fff6f2deba89c0178d3122bbd1fda6e /include/linux/rcupdate.h
parent6846c0c54074d47927c90eab4a805115e1ae3292 (diff)
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>
Diffstat (limited to 'include/linux/rcupdate.h')
-rw-r--r--include/linux/rcupdate.h14
1 files changed, 2 insertions, 12 deletions
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
index af186e260c43..2cf4226ade7e 100644
--- a/include/linux/rcupdate.h
+++ b/include/linux/rcupdate.h
@@ -134,16 +134,6 @@ extern void call_rcu_sched(struct rcu_head *head,
extern void synchronize_sched(void);
-static inline void __rcu_read_lock_bh(void)
-{
- local_bh_disable();
-}
-
-static inline void __rcu_read_unlock_bh(void)
-{
- local_bh_enable();
-}
-
#ifdef CONFIG_PREEMPT_RCU
extern void __rcu_read_lock(void);
@@ -686,7 +676,7 @@ static inline void rcu_read_unlock(void)
*/
static inline void rcu_read_lock_bh(void)
{
- __rcu_read_lock_bh();
+ local_bh_disable();
__acquire(RCU_BH);
rcu_read_acquire_bh();
}
@@ -700,7 +690,7 @@ static inline void rcu_read_unlock_bh(void)
{
rcu_read_release_bh();
__release(RCU_BH);
- __rcu_read_unlock_bh();
+ local_bh_enable();
}
/**