fixes to include/linux/rcupreempt.h
PATCH 1/1 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.
---
include/linux/rcupreempt.h +1 -2
@@ -111,7 +111,6 @@ extern struct rcupreempt_trace *rcupreempt_trace_cpu(int cpu);struct softirq_action ;#ifdef CONFIG_NO_HZ -DECLARE_PER_CPU(struct rcu_dyntick_sched, rcu_dyntick_sched);static inline void rcu_enter_nohz (void ) {
@@ -122,8 +121,8 @@ static inline void rcu_enter_nohz(void)static inline void rcu_exit_nohz (void ) { -smp_mb ();/* CPUs seeing ++ must see later RCU read-side crit sects */ __get_cpu_var (rcu_dyntick_sched).dynticks++; +smp_mb ();/* CPUs seeing ++ must see later RCU read-side crit sects */ WARN_ON (!(__get_cpu_var (rcu_dyntick_sched).dynticks &0x1 )); }
Ingo Molnar
AppliedQuoted 5 lines · Paul E. McKenney
Hello!
Compared tip/core/rcu to my latest patchset, and found the following issues:
Quoted 8 lines
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 <[email protected]>
applied to tip/core/rcu - thanks Paul.
Ingo
Steven Rostedt
reviewerSorry for the late post, I'm finally looking at all my -rt mail.
Quoted 20 lines · Paul E. McKenney
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 <[email protected]>---
include/linux/rcupreempt.h +0
-0
include/linux/rcupreempt.h extern struct rcupreempt_trace *rcupreempt_trace_cpu(int cpu); · line 114
Quoted 4 lines
include/linux/rcupreempt.h +0
-1@@ -111,7 +111,6 @@ extern struct rcupreempt_trace *rcupreempt_trace_cpu(int cpu);struct softirq_action ;#ifdef CONFIG_NO_HZ -DECLARE_PER_CPU(struct rcu_dyntick_sched, rcu_dyntick_sched);
In -rt we deleted the first declaration. Is rcu_dyntick_sched defined on !CONFIG_NO_HZ?
-- Steve
Quoted 14 lines
include/linux/rcupreempt.h +1
-1static inline void rcu_enter_nohz (void ) {@@ -122,8 +121,8 @@ static inline void rcu_enter_nohz(void)static inline void rcu_exit_nohz (void ) { -smp_mb ();/* CPUs seeing ++ must see later RCU read-side crit sects */ __get_cpu_var (rcu_dyntick_sched).dynticks++; +smp_mb ();/* CPUs seeing ++ must see later RCU read-side crit sects */ WARN_ON (!(__get_cpu_var (rcu_dyntick_sched).dynticks &0x1 )); }
Quoted 28 lines · Steven Rostedt
Sorry for the late post, I'm finally looking at all my -rt mail.
Quoted 22 lines · Paul E. McKenney
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 <[email protected]>---
include/linux/rcupreempt.h +0
-0@@ -111,7 +111,6 @@ extern struct rcupreempt_trace *rcupreempt_trace_cpu(int cpu);struct softirq_action ;
Quoted 5 lines
include/linux/rcupreempt.h extern struct rcupreempt_trace *rcupreempt_trace_cpu(int cpu); · line 114
Quoted 2 lines
include/linux/rcupreempt.h +0
-1#ifdef CONFIG_NO_HZ -DECLARE_PER_CPU(struct rcu_dyntick_sched, rcu_dyntick_sched);In -rt we deleted the first declaration. Is
rcu_dyntick_scheddefined on !CONFIG_NO_HZ?
It builds for me in current tip/core/rcu without the above DECLARE_PER_CPU(). And the reason is the call_rcu_sched() function, which requires rcu_dyntick_sched.sched_qs and rcu_dyntick_sched.sched_qs_snap be defined even if !CONFIG_NO_HZ.
I suppose I could remove the other elements from the rcu_dyntick_sched structure if !CONFIG_NO_HZ. Worthwhile?
Thanx, Paul
Quoted 16 lines
-- Steve
Quoted 14 lines
include/linux/rcupreempt.h +1
-1static inline void rcu_enter_nohz (void ) {@@ -122,8 +121,8 @@ static inline void rcu_enter_nohz(void)static inline void rcu_exit_nohz (void ) { -smp_mb ();/* CPUs seeing ++ must see later RCU read-side crit sects */ __get_cpu_var (rcu_dyntick_sched).dynticks++; +smp_mb ();/* CPUs seeing ++ must see later RCU read-side crit sects */ WARN_ON (!(__get_cpu_var (rcu_dyntick_sched).dynticks &0x1 )); }
Steven Rostedt
reviewerQuoted 5 lines · Paul E. McKenney
Quoted 4 lines
Quoted 1 line
-DECLARE_PER_CPU(struct
rcu_dyntick_sched,rcu_dyntick_sched);In -rt we deleted the first declaration. Is
rcu_dyntick_scheddefined on !CONFIG_NO_HZ?
Quoted 8 lines
It builds for me in current tip/core/rcu without the above
DECLARE_PER_CPU(). And the reason is thecall_rcu_sched()function, which requires rcu_dyntick_sched.sched_qs and rcu_dyntick_sched.sched_qs_snap be defined even if !CONFIG_NO_HZ.I suppose I could remove the other elements from the
rcu_dyntick_schedstructure if !CONFIG_NO_HZ. Worthwhile?
Nah, forget about it. I've got a few different versions I'm dealing with.
Thanks,
-- Steve