aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>2008-08-01 17:10:02 -0400
committerIngo Molnar <mingo@elte.hu>2008-08-15 11:02:56 -0400
commitff9cf2ce7afe76435d66c898cc9dacaa68e79d41 (patch)
tree81f97a2793fd5487c95e03b84ff061c1391be091
parent1f7b94cd3d564901f9e04a8bc5832ae7bfd690a0 (diff)
rcu: fixes to include/linux/rcupreempt.h
Hello! Compared tip/core/rcu to my latest patchset, and found the following issues: o the memory barrier in rcu_exit_nohz() somehow got out of place (it is correct in mainline as of 2.6.26-rc7). o There is a duplicate declaration of rcu_dyntick_sched. The attached patch fixes these. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r--include/linux/rcupreempt.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/include/linux/rcupreempt.h b/include/linux/rcupreempt.h
index 0967f03b0705..addb5e282f39 100644
--- a/include/linux/rcupreempt.h
+++ b/include/linux/rcupreempt.h
@@ -111,7 +111,6 @@ extern struct rcupreempt_trace *rcupreempt_trace_cpu(int cpu);
111struct softirq_action; 111struct softirq_action;
112 112
113#ifdef CONFIG_NO_HZ 113#ifdef CONFIG_NO_HZ
114DECLARE_PER_CPU(struct rcu_dyntick_sched, rcu_dyntick_sched);
115 114
116static inline void rcu_enter_nohz(void) 115static inline void rcu_enter_nohz(void)
117{ 116{
@@ -126,8 +125,8 @@ static inline void rcu_exit_nohz(void)
126{ 125{
127 static DEFINE_RATELIMIT_STATE(rs, 10 * HZ, 1); 126 static DEFINE_RATELIMIT_STATE(rs, 10 * HZ, 1);
128 127
129 smp_mb(); /* CPUs seeing ++ must see later RCU read-side crit sects */
130 __get_cpu_var(rcu_dyntick_sched).dynticks++; 128 __get_cpu_var(rcu_dyntick_sched).dynticks++;
129 smp_mb(); /* CPUs seeing ++ must see later RCU read-side crit sects */
131 WARN_ON_RATELIMIT(!(__get_cpu_var(rcu_dyntick_sched).dynticks & 0x1), 130 WARN_ON_RATELIMIT(!(__get_cpu_var(rcu_dyntick_sched).dynticks & 0x1),
132 &rs); 131 &rs);
133} 132}