* [PATCH -tip/core/rcu] fixes to include/linux/rcupreempt.h
@ 2008-08-01 21:10 Paul E. McKenney
2008-08-15 15:02 ` Ingo Molnar
2008-08-20 16:16 ` Steven Rostedt
0 siblings, 2 replies; 5+ messages in thread
From: Paul E. McKenney @ 2008-08-01 21:10 UTC (permalink / raw)
To: linux-kernel; +Cc: mingo, rostedt, akpm, ego, dvhltc, niv
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>
---
diff --git a/include/linux/rcupreempt.h b/include/linux/rcupreempt.h
index f04b64e..84678bf 100644
--- a/include/linux/rcupreempt.h
+++ b/include/linux/rcupreempt.h
@@ -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));
}
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH -tip/core/rcu] fixes to include/linux/rcupreempt.h
2008-08-01 21:10 [PATCH -tip/core/rcu] fixes to include/linux/rcupreempt.h Paul E. McKenney
@ 2008-08-15 15:02 ` Ingo Molnar
2008-08-20 16:16 ` Steven Rostedt
1 sibling, 0 replies; 5+ messages in thread
From: Ingo Molnar @ 2008-08-15 15:02 UTC (permalink / raw)
To: Paul E. McKenney; +Cc: linux-kernel, rostedt, akpm, ego, dvhltc, niv
* Paul E. McKenney <paulmck@linux.vnet.ibm.com> wrote:
> 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>
applied to tip/core/rcu - thanks Paul.
Ingo
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH -tip/core/rcu] fixes to include/linux/rcupreempt.h
2008-08-01 21:10 [PATCH -tip/core/rcu] fixes to include/linux/rcupreempt.h Paul E. McKenney
2008-08-15 15:02 ` Ingo Molnar
@ 2008-08-20 16:16 ` Steven Rostedt
2008-08-20 22:33 ` Paul E. McKenney
1 sibling, 1 reply; 5+ messages in thread
From: Steven Rostedt @ 2008-08-20 16:16 UTC (permalink / raw)
To: Paul E. McKenney; +Cc: linux-kernel, mingo, akpm, ego, dvhltc, niv
Sorry for the late post, I'm finally looking at all my -rt mail.
On Fri, 1 Aug 2008, Paul E. McKenney wrote:
> 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>
> ---
>
> diff --git a/include/linux/rcupreempt.h b/include/linux/rcupreempt.h
> index f04b64e..84678bf 100644
> --- a/include/linux/rcupreempt.h
> +++ b/include/linux/rcupreempt.h
> @@ -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
>
> 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));
> }
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH -tip/core/rcu] fixes to include/linux/rcupreempt.h
2008-08-20 16:16 ` Steven Rostedt
@ 2008-08-20 22:33 ` Paul E. McKenney
2008-08-21 1:01 ` Steven Rostedt
0 siblings, 1 reply; 5+ messages in thread
From: Paul E. McKenney @ 2008-08-20 22:33 UTC (permalink / raw)
To: Steven Rostedt; +Cc: linux-kernel, mingo, akpm, ego, dvhltc, niv
On Wed, Aug 20, 2008 at 12:16:44PM -0400, Steven Rostedt wrote:
>
> Sorry for the late post, I'm finally looking at all my -rt mail.
>
>
> On Fri, 1 Aug 2008, Paul E. McKenney wrote:
>
> > 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>
> > ---
> >
> > diff --git a/include/linux/rcupreempt.h b/include/linux/rcupreempt.h
> > index f04b64e..84678bf 100644
> > --- a/include/linux/rcupreempt.h
> > +++ b/include/linux/rcupreempt.h
> > @@ -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?
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
> -- Steve
>
> >
> > 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));
> > }
> >
> >
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH -tip/core/rcu] fixes to include/linux/rcupreempt.h
2008-08-20 22:33 ` Paul E. McKenney
@ 2008-08-21 1:01 ` Steven Rostedt
0 siblings, 0 replies; 5+ messages in thread
From: Steven Rostedt @ 2008-08-21 1:01 UTC (permalink / raw)
To: Paul E. McKenney; +Cc: linux-kernel, mingo, akpm, ego, dvhltc, niv
On Wed, 20 Aug 2008, Paul E. McKenney wrote:
> > > -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?
>
> 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?
>
Nah, forget about it. I've got a few different versions I'm dealing with.
Thanks,
-- Steve
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-08-21 1:02 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-01 21:10 [PATCH -tip/core/rcu] fixes to include/linux/rcupreempt.h Paul E. McKenney
2008-08-15 15:02 ` Ingo Molnar
2008-08-20 16:16 ` Steven Rostedt
2008-08-20 22:33 ` Paul E. McKenney
2008-08-21 1:01 ` Steven Rostedt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox