linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] rcu: declare rcu_data variables in the section they are defined in
@ 2015-05-03  9:57 Nicolas Iooss
  2015-05-03 19:27 ` Josh Triplett
  0 siblings, 1 reply; 8+ messages in thread
From: Nicolas Iooss @ 2015-05-03  9:57 UTC (permalink / raw)
  To: Paul E. McKenney, Josh Triplett, Steven Rostedt,
	Mathieu Desnoyers, Lai Jiangshan
  Cc: linux-kernel, Nicolas Iooss

Commit 11bbb235c26f ("rcu: Use DEFINE_PER_CPU_SHARED_ALIGNED for
rcu_data") replaced DEFINE_PER_CPU by DEFINE_PER_CPU_SHARED_ALIGNED in
the definition of rcu_sched and rcu_bh without updating
kernel/rcu/tree.h.

This makes clang report a section mismatch (-Wsection warning) when
building LLVMLinux because the variables are declared in .data..percpu
but defined in .data..percpu..shared_aligned.

Signed-off-by: Nicolas Iooss <nicolas.iooss_linux@m4x.org>
---
 kernel/rcu/tree.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/rcu/tree.h b/kernel/rcu/tree.h
index a69d3dab2ec4..c5e85b27a79f 100644
--- a/kernel/rcu/tree.h
+++ b/kernel/rcu/tree.h
@@ -519,10 +519,10 @@ extern struct list_head rcu_struct_flavors;
  * RCU implementation internal declarations:
  */
 extern struct rcu_state rcu_sched_state;
-DECLARE_PER_CPU(struct rcu_data, rcu_sched_data);
+DECLARE_PER_CPU_SHARED_ALIGNED(struct rcu_data, rcu_sched_data);
 
 extern struct rcu_state rcu_bh_state;
-DECLARE_PER_CPU(struct rcu_data, rcu_bh_data);
+DECLARE_PER_CPU_SHARED_ALIGNED(struct rcu_data, rcu_bh_data);
 
 #ifdef CONFIG_PREEMPT_RCU
 extern struct rcu_state rcu_preempt_state;
-- 
2.3.6


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] rcu: declare rcu_data variables in the section they are defined in
  2015-05-03  9:57 [PATCH] rcu: declare rcu_data variables in the section they are defined in Nicolas Iooss
@ 2015-05-03 19:27 ` Josh Triplett
  2015-05-04 20:33   ` Paul E. McKenney
  0 siblings, 1 reply; 8+ messages in thread
From: Josh Triplett @ 2015-05-03 19:27 UTC (permalink / raw)
  To: Nicolas Iooss
  Cc: Paul E. McKenney, Steven Rostedt, Mathieu Desnoyers,
	Lai Jiangshan, linux-kernel

On Sun, May 03, 2015 at 05:57:53PM +0800, Nicolas Iooss wrote:
> Commit 11bbb235c26f ("rcu: Use DEFINE_PER_CPU_SHARED_ALIGNED for
> rcu_data") replaced DEFINE_PER_CPU by DEFINE_PER_CPU_SHARED_ALIGNED in
> the definition of rcu_sched and rcu_bh without updating
> kernel/rcu/tree.h.
> 
> This makes clang report a section mismatch (-Wsection warning) when
> building LLVMLinux because the variables are declared in .data..percpu
> but defined in .data..percpu..shared_aligned.
> 
> Signed-off-by: Nicolas Iooss <nicolas.iooss_linux@m4x.org>

Good catch.
Reviewed-by: Josh Triplett <josh@joshtriplett.org>

> ---
>  kernel/rcu/tree.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/kernel/rcu/tree.h b/kernel/rcu/tree.h
> index a69d3dab2ec4..c5e85b27a79f 100644
> --- a/kernel/rcu/tree.h
> +++ b/kernel/rcu/tree.h
> @@ -519,10 +519,10 @@ extern struct list_head rcu_struct_flavors;
>   * RCU implementation internal declarations:
>   */
>  extern struct rcu_state rcu_sched_state;
> -DECLARE_PER_CPU(struct rcu_data, rcu_sched_data);
> +DECLARE_PER_CPU_SHARED_ALIGNED(struct rcu_data, rcu_sched_data);
>  
>  extern struct rcu_state rcu_bh_state;
> -DECLARE_PER_CPU(struct rcu_data, rcu_bh_data);
> +DECLARE_PER_CPU_SHARED_ALIGNED(struct rcu_data, rcu_bh_data);
>  
>  #ifdef CONFIG_PREEMPT_RCU
>  extern struct rcu_state rcu_preempt_state;
> -- 
> 2.3.6
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] rcu: declare rcu_data variables in the section they are defined in
  2015-05-03 19:27 ` Josh Triplett
@ 2015-05-04 20:33   ` Paul E. McKenney
  2015-05-05  0:40     ` Nicolas Iooss
  0 siblings, 1 reply; 8+ messages in thread
From: Paul E. McKenney @ 2015-05-04 20:33 UTC (permalink / raw)
  To: Josh Triplett
  Cc: Nicolas Iooss, Steven Rostedt, Mathieu Desnoyers, Lai Jiangshan,
	linux-kernel

On Sun, May 03, 2015 at 12:27:02PM -0700, Josh Triplett wrote:
> On Sun, May 03, 2015 at 05:57:53PM +0800, Nicolas Iooss wrote:
> > Commit 11bbb235c26f ("rcu: Use DEFINE_PER_CPU_SHARED_ALIGNED for
> > rcu_data") replaced DEFINE_PER_CPU by DEFINE_PER_CPU_SHARED_ALIGNED in
> > the definition of rcu_sched and rcu_bh without updating
> > kernel/rcu/tree.h.
> > 
> > This makes clang report a section mismatch (-Wsection warning) when
> > building LLVMLinux because the variables are declared in .data..percpu
> > but defined in .data..percpu..shared_aligned.
> > 
> > Signed-off-by: Nicolas Iooss <nicolas.iooss_linux@m4x.org>
> 
> Good catch.
> Reviewed-by: Josh Triplett <josh@joshtriplett.org>

Agreed, good catch!  But don't we also need to worry about
rcu_preempt_data?  Also, given that tree_trace.c now uses iterators
rather than direct access via the per-CPU variables, wouldn't the
following be more appropriate?  (-Very- lightly tested.)

							Thanx, Paul

------------------------------------------------------------------------

diff --git a/kernel/rcu/tree.h b/kernel/rcu/tree.h
index da9f6adb5ff9..ee86870b1825 100644
--- a/kernel/rcu/tree.h
+++ b/kernel/rcu/tree.h
@@ -537,17 +537,6 @@ extern struct list_head rcu_struct_flavors;
 /*
  * RCU implementation internal declarations:
  */
-extern struct rcu_state rcu_sched_state;
-DECLARE_PER_CPU(struct rcu_data, rcu_sched_data);
-
-extern struct rcu_state rcu_bh_state;
-DECLARE_PER_CPU(struct rcu_data, rcu_bh_data);
-
-#ifdef CONFIG_PREEMPT_RCU
-extern struct rcu_state rcu_preempt_state;
-DECLARE_PER_CPU(struct rcu_data, rcu_preempt_data);
-#endif /* #ifdef CONFIG_PREEMPT_RCU */
-
 #ifdef CONFIG_RCU_BOOST
 DECLARE_PER_CPU(unsigned int, rcu_cpu_kthread_status);
 DECLARE_PER_CPU(int, rcu_cpu_kthread_cpu);


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] rcu: declare rcu_data variables in the section they are defined in
  2015-05-04 20:33   ` Paul E. McKenney
@ 2015-05-05  0:40     ` Nicolas Iooss
  2015-05-05  5:55       ` Paul E. McKenney
  0 siblings, 1 reply; 8+ messages in thread
From: Nicolas Iooss @ 2015-05-05  0:40 UTC (permalink / raw)
  To: paulmck, Josh Triplett
  Cc: Steven Rostedt, Mathieu Desnoyers, Lai Jiangshan, linux-kernel

On 05/05/2015 04:33 AM, Paul E. McKenney wrote:
> On Sun, May 03, 2015 at 12:27:02PM -0700, Josh Triplett wrote:
>> On Sun, May 03, 2015 at 05:57:53PM +0800, Nicolas Iooss wrote:
>>> Commit 11bbb235c26f ("rcu: Use DEFINE_PER_CPU_SHARED_ALIGNED for
>>> rcu_data") replaced DEFINE_PER_CPU by DEFINE_PER_CPU_SHARED_ALIGNED in
>>> the definition of rcu_sched and rcu_bh without updating
>>> kernel/rcu/tree.h.
>>>
>>> This makes clang report a section mismatch (-Wsection warning) when
>>> building LLVMLinux because the variables are declared in .data..percpu
>>> but defined in .data..percpu..shared_aligned.
>>>
>>> Signed-off-by: Nicolas Iooss <nicolas.iooss_linux@m4x.org>
>>
>> Good catch.
>> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
> 
> Agreed, good catch!  But don't we also need to worry about
> rcu_preempt_data?

Yes, I missed it because I didn't know that allyesconfig/allmodconfig
does not select CONFIG_PREEMPT (it selects CONFIG_PREEMPT_NONE instead).

> Also, given that tree_trace.c now uses iterators
> rather than direct access via the per-CPU variables, wouldn't the
> following be more appropriate?  (-Very- lightly tested.)

This doesn't work with CONFIG_TREE_RCU_TRACE, because
kernel/rcu/tree_trace.c uses rcu_preempt_state (in v4.1-rc2).  I've
successfully built an allmodconfig+CONFIG_PREEMPT kernel for x86_64 with
the following patch (I have not tested the result).

Anyway, thanks for your quick replies.

Nicolas

--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -91,7 +91,7 @@ static const char *tp_##sname##_varname __used
__tracepoint_string = sname##_var

 #define RCU_STATE_INITIALIZER(sname, sabbr, cr) \
 DEFINE_RCU_TPS(sname) \
-DEFINE_PER_CPU_SHARED_ALIGNED(struct rcu_data, sname##_data); \
+static DEFINE_PER_CPU_SHARED_ALIGNED(struct rcu_data, sname##_data); \
 struct rcu_state sname##_state = { \
 	.level = { &sname##_state.node[0] }, \
 	.rda = &sname##_data, \
--- a/kernel/rcu/tree.h
+++ b/kernel/rcu/tree.h
@@ -519,14 +519,11 @@ extern struct list_head rcu_struct_flavors;
  * RCU implementation internal declarations:
  */
 extern struct rcu_state rcu_sched_state;
-DECLARE_PER_CPU(struct rcu_data, rcu_sched_data);

 extern struct rcu_state rcu_bh_state;
-DECLARE_PER_CPU(struct rcu_data, rcu_bh_data);

 #ifdef CONFIG_PREEMPT_RCU
 extern struct rcu_state rcu_preempt_state;
-DECLARE_PER_CPU(struct rcu_data, rcu_preempt_data);
 #endif /* #ifdef CONFIG_PREEMPT_RCU */

 #ifdef CONFIG_RCU_BOOST


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] rcu: declare rcu_data variables in the section they are defined in
  2015-05-05  0:40     ` Nicolas Iooss
@ 2015-05-05  5:55       ` Paul E. McKenney
  2015-05-05 13:57         ` [PATCH] rcu: make rcu_*_data variables static Nicolas Iooss
  0 siblings, 1 reply; 8+ messages in thread
From: Paul E. McKenney @ 2015-05-05  5:55 UTC (permalink / raw)
  To: Nicolas Iooss
  Cc: Josh Triplett, Steven Rostedt, Mathieu Desnoyers, Lai Jiangshan,
	linux-kernel

On Tue, May 05, 2015 at 08:40:55AM +0800, Nicolas Iooss wrote:
> On 05/05/2015 04:33 AM, Paul E. McKenney wrote:
> > On Sun, May 03, 2015 at 12:27:02PM -0700, Josh Triplett wrote:
> >> On Sun, May 03, 2015 at 05:57:53PM +0800, Nicolas Iooss wrote:
> >>> Commit 11bbb235c26f ("rcu: Use DEFINE_PER_CPU_SHARED_ALIGNED for
> >>> rcu_data") replaced DEFINE_PER_CPU by DEFINE_PER_CPU_SHARED_ALIGNED in
> >>> the definition of rcu_sched and rcu_bh without updating
> >>> kernel/rcu/tree.h.
> >>>
> >>> This makes clang report a section mismatch (-Wsection warning) when
> >>> building LLVMLinux because the variables are declared in .data..percpu
> >>> but defined in .data..percpu..shared_aligned.
> >>>
> >>> Signed-off-by: Nicolas Iooss <nicolas.iooss_linux@m4x.org>
> >>
> >> Good catch.
> >> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
> > 
> > Agreed, good catch!  But don't we also need to worry about
> > rcu_preempt_data?
> 
> Yes, I missed it because I didn't know that allyesconfig/allmodconfig
> does not select CONFIG_PREEMPT (it selects CONFIG_PREEMPT_NONE instead).
> 
> > Also, given that tree_trace.c now uses iterators
> > rather than direct access via the per-CPU variables, wouldn't the
> > following be more appropriate?  (-Very- lightly tested.)
> 
> This doesn't work with CONFIG_TREE_RCU_TRACE, because
> kernel/rcu/tree_trace.c uses rcu_preempt_state (in v4.1-rc2).  I've
> successfully built an allmodconfig+CONFIG_PREEMPT kernel for x86_64 with
> the following patch (I have not tested the result).
> 
> Anyway, thanks for your quick replies.

Good point, and your patch does look better.

If you resend with proper changelog and Signed-off-by, and if Josh is
good with the change, I will queue it.

							Thanx, Paul

> Nicolas
> 
> --- a/kernel/rcu/tree.c
> +++ b/kernel/rcu/tree.c
> @@ -91,7 +91,7 @@ static const char *tp_##sname##_varname __used
> __tracepoint_string = sname##_var
> 
>  #define RCU_STATE_INITIALIZER(sname, sabbr, cr) \
>  DEFINE_RCU_TPS(sname) \
> -DEFINE_PER_CPU_SHARED_ALIGNED(struct rcu_data, sname##_data); \
> +static DEFINE_PER_CPU_SHARED_ALIGNED(struct rcu_data, sname##_data); \
>  struct rcu_state sname##_state = { \
>  	.level = { &sname##_state.node[0] }, \
>  	.rda = &sname##_data, \
> --- a/kernel/rcu/tree.h
> +++ b/kernel/rcu/tree.h
> @@ -519,14 +519,11 @@ extern struct list_head rcu_struct_flavors;
>   * RCU implementation internal declarations:
>   */
>  extern struct rcu_state rcu_sched_state;
> -DECLARE_PER_CPU(struct rcu_data, rcu_sched_data);
> 
>  extern struct rcu_state rcu_bh_state;
> -DECLARE_PER_CPU(struct rcu_data, rcu_bh_data);
> 
>  #ifdef CONFIG_PREEMPT_RCU
>  extern struct rcu_state rcu_preempt_state;
> -DECLARE_PER_CPU(struct rcu_data, rcu_preempt_data);
>  #endif /* #ifdef CONFIG_PREEMPT_RCU */
> 
>  #ifdef CONFIG_RCU_BOOST
> 


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH] rcu: make rcu_*_data variables static
  2015-05-05  5:55       ` Paul E. McKenney
@ 2015-05-05 13:57         ` Nicolas Iooss
  2015-05-05 23:25           ` josh
  0 siblings, 1 reply; 8+ messages in thread
From: Nicolas Iooss @ 2015-05-05 13:57 UTC (permalink / raw)
  To: Paul E. McKenney, Josh Triplett, Steven Rostedt,
	Mathieu Desnoyers, Lai Jiangshan
  Cc: linux-kernel, Nicolas Iooss

rcu_bh_data, rcu_sched_data and rcu_preempt_data are never used outside
kernel/rcu/tree.c and thus can be made static.

Doing so fixes a section mismatch warning reported by clang when
building LLVMLinux with -Wsection, because these variables were declared
in .data..percpu and defined in .data..percpu..shared_aligned since
commit 11bbb235c26f ("rcu: Use DEFINE_PER_CPU_SHARED_ALIGNED for
rcu_data").

Signed-off-by: Nicolas Iooss <nicolas.iooss_linux@m4x.org>
---
 kernel/rcu/tree.c | 2 +-
 kernel/rcu/tree.h | 3 ---
 2 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index 233165da782f..e4a607fc5ad0 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -91,7 +91,7 @@ static const char *tp_##sname##_varname __used __tracepoint_string = sname##_var
 
 #define RCU_STATE_INITIALIZER(sname, sabbr, cr) \
 DEFINE_RCU_TPS(sname) \
-DEFINE_PER_CPU_SHARED_ALIGNED(struct rcu_data, sname##_data); \
+static DEFINE_PER_CPU_SHARED_ALIGNED(struct rcu_data, sname##_data); \
 struct rcu_state sname##_state = { \
 	.level = { &sname##_state.node[0] }, \
 	.rda = &sname##_data, \
diff --git a/kernel/rcu/tree.h b/kernel/rcu/tree.h
index a69d3dab2ec4..0c32f730d033 100644
--- a/kernel/rcu/tree.h
+++ b/kernel/rcu/tree.h
@@ -519,14 +519,11 @@ extern struct list_head rcu_struct_flavors;
  * RCU implementation internal declarations:
  */
 extern struct rcu_state rcu_sched_state;
-DECLARE_PER_CPU(struct rcu_data, rcu_sched_data);
 
 extern struct rcu_state rcu_bh_state;
-DECLARE_PER_CPU(struct rcu_data, rcu_bh_data);
 
 #ifdef CONFIG_PREEMPT_RCU
 extern struct rcu_state rcu_preempt_state;
-DECLARE_PER_CPU(struct rcu_data, rcu_preempt_data);
 #endif /* #ifdef CONFIG_PREEMPT_RCU */
 
 #ifdef CONFIG_RCU_BOOST
-- 
2.3.6


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] rcu: make rcu_*_data variables static
  2015-05-05 13:57         ` [PATCH] rcu: make rcu_*_data variables static Nicolas Iooss
@ 2015-05-05 23:25           ` josh
  2015-05-06  6:09             ` Paul E. McKenney
  0 siblings, 1 reply; 8+ messages in thread
From: josh @ 2015-05-05 23:25 UTC (permalink / raw)
  To: Nicolas Iooss
  Cc: Paul E. McKenney, Steven Rostedt, Mathieu Desnoyers,
	Lai Jiangshan, linux-kernel

On Tue, May 05, 2015 at 09:57:06PM +0800, Nicolas Iooss wrote:
> rcu_bh_data, rcu_sched_data and rcu_preempt_data are never used outside
> kernel/rcu/tree.c and thus can be made static.
> 
> Doing so fixes a section mismatch warning reported by clang when
> building LLVMLinux with -Wsection, because these variables were declared
> in .data..percpu and defined in .data..percpu..shared_aligned since
> commit 11bbb235c26f ("rcu: Use DEFINE_PER_CPU_SHARED_ALIGNED for
> rcu_data").
> 
> Signed-off-by: Nicolas Iooss <nicolas.iooss_linux@m4x.org>

Reviewed-by: Josh Triplett <josh@joshtriplett.org>

Nice improvement.

Minor nit: since these are only one line each now, they don't really
need a blank line between them, but *shrug*.

> ---
>  kernel/rcu/tree.c | 2 +-
>  kernel/rcu/tree.h | 3 ---
>  2 files changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
> index 233165da782f..e4a607fc5ad0 100644
> --- a/kernel/rcu/tree.c
> +++ b/kernel/rcu/tree.c
> @@ -91,7 +91,7 @@ static const char *tp_##sname##_varname __used __tracepoint_string = sname##_var
>  
>  #define RCU_STATE_INITIALIZER(sname, sabbr, cr) \
>  DEFINE_RCU_TPS(sname) \
> -DEFINE_PER_CPU_SHARED_ALIGNED(struct rcu_data, sname##_data); \
> +static DEFINE_PER_CPU_SHARED_ALIGNED(struct rcu_data, sname##_data); \
>  struct rcu_state sname##_state = { \
>  	.level = { &sname##_state.node[0] }, \
>  	.rda = &sname##_data, \
> diff --git a/kernel/rcu/tree.h b/kernel/rcu/tree.h
> index a69d3dab2ec4..0c32f730d033 100644
> --- a/kernel/rcu/tree.h
> +++ b/kernel/rcu/tree.h
> @@ -519,14 +519,11 @@ extern struct list_head rcu_struct_flavors;
>   * RCU implementation internal declarations:
>   */
>  extern struct rcu_state rcu_sched_state;
> -DECLARE_PER_CPU(struct rcu_data, rcu_sched_data);
>  
>  extern struct rcu_state rcu_bh_state;
> -DECLARE_PER_CPU(struct rcu_data, rcu_bh_data);
>  
>  #ifdef CONFIG_PREEMPT_RCU
>  extern struct rcu_state rcu_preempt_state;
> -DECLARE_PER_CPU(struct rcu_data, rcu_preempt_data);
>  #endif /* #ifdef CONFIG_PREEMPT_RCU */
>  
>  #ifdef CONFIG_RCU_BOOST
> -- 
> 2.3.6
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] rcu: make rcu_*_data variables static
  2015-05-05 23:25           ` josh
@ 2015-05-06  6:09             ` Paul E. McKenney
  0 siblings, 0 replies; 8+ messages in thread
From: Paul E. McKenney @ 2015-05-06  6:09 UTC (permalink / raw)
  To: josh
  Cc: Nicolas Iooss, Steven Rostedt, Mathieu Desnoyers, Lai Jiangshan,
	linux-kernel

On Tue, May 05, 2015 at 04:25:58PM -0700, josh@joshtriplett.org wrote:
> On Tue, May 05, 2015 at 09:57:06PM +0800, Nicolas Iooss wrote:
> > rcu_bh_data, rcu_sched_data and rcu_preempt_data are never used outside
> > kernel/rcu/tree.c and thus can be made static.
> > 
> > Doing so fixes a section mismatch warning reported by clang when
> > building LLVMLinux with -Wsection, because these variables were declared
> > in .data..percpu and defined in .data..percpu..shared_aligned since
> > commit 11bbb235c26f ("rcu: Use DEFINE_PER_CPU_SHARED_ALIGNED for
> > rcu_data").
> > 
> > Signed-off-by: Nicolas Iooss <nicolas.iooss_linux@m4x.org>
> 
> Reviewed-by: Josh Triplett <josh@joshtriplett.org>

Applied, thank you both!

> Nice improvement.
> 
> Minor nit: since these are only one line each now, they don't really
> need a blank line between them, but *shrug*.

I don't mind the grouping implied by the blank lines, but I agree that
it is close to the edge.

							Thanx, Paul

> > ---
> >  kernel/rcu/tree.c | 2 +-
> >  kernel/rcu/tree.h | 3 ---
> >  2 files changed, 1 insertion(+), 4 deletions(-)
> > 
> > diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
> > index 233165da782f..e4a607fc5ad0 100644
> > --- a/kernel/rcu/tree.c
> > +++ b/kernel/rcu/tree.c
> > @@ -91,7 +91,7 @@ static const char *tp_##sname##_varname __used __tracepoint_string = sname##_var
> >  
> >  #define RCU_STATE_INITIALIZER(sname, sabbr, cr) \
> >  DEFINE_RCU_TPS(sname) \
> > -DEFINE_PER_CPU_SHARED_ALIGNED(struct rcu_data, sname##_data); \
> > +static DEFINE_PER_CPU_SHARED_ALIGNED(struct rcu_data, sname##_data); \
> >  struct rcu_state sname##_state = { \
> >  	.level = { &sname##_state.node[0] }, \
> >  	.rda = &sname##_data, \
> > diff --git a/kernel/rcu/tree.h b/kernel/rcu/tree.h
> > index a69d3dab2ec4..0c32f730d033 100644
> > --- a/kernel/rcu/tree.h
> > +++ b/kernel/rcu/tree.h
> > @@ -519,14 +519,11 @@ extern struct list_head rcu_struct_flavors;
> >   * RCU implementation internal declarations:
> >   */
> >  extern struct rcu_state rcu_sched_state;
> > -DECLARE_PER_CPU(struct rcu_data, rcu_sched_data);
> >  
> >  extern struct rcu_state rcu_bh_state;
> > -DECLARE_PER_CPU(struct rcu_data, rcu_bh_data);
> >  
> >  #ifdef CONFIG_PREEMPT_RCU
> >  extern struct rcu_state rcu_preempt_state;
> > -DECLARE_PER_CPU(struct rcu_data, rcu_preempt_data);
> >  #endif /* #ifdef CONFIG_PREEMPT_RCU */
> >  
> >  #ifdef CONFIG_RCU_BOOST
> > -- 
> > 2.3.6
> > 
> 


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-05-06  6:09 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-03  9:57 [PATCH] rcu: declare rcu_data variables in the section they are defined in Nicolas Iooss
2015-05-03 19:27 ` Josh Triplett
2015-05-04 20:33   ` Paul E. McKenney
2015-05-05  0:40     ` Nicolas Iooss
2015-05-05  5:55       ` Paul E. McKenney
2015-05-05 13:57         ` [PATCH] rcu: make rcu_*_data variables static Nicolas Iooss
2015-05-05 23:25           ` josh
2015-05-06  6:09             ` Paul E. McKenney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).