linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] rcu: tiny.c: Update reference to tree.c
@ 2014-07-15 22:31 Pranith Kumar
  2014-07-15 22:31 ` [PATCH 2/3] rcu: Remove stale comment in tree.c Pranith Kumar
                   ` (2 more replies)
  0 siblings, 3 replies; 19+ messages in thread
From: Pranith Kumar @ 2014-07-15 22:31 UTC (permalink / raw)
  To: Paul E. McKenney, Josh Triplett, Steven Rostedt,
	Mathieu Desnoyers, Lai Jiangshan, open list:READ-COPY UPDATE...

This commit updates the references to rcutree.c which is now rcu/tree.c

Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
---
 kernel/rcu/tiny.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/rcu/tiny.c b/kernel/rcu/tiny.c
index d9efcc1..6bd785c 100644
--- a/kernel/rcu/tiny.c
+++ b/kernel/rcu/tiny.c
@@ -51,7 +51,7 @@ static long long rcu_dynticks_nesting = DYNTICK_TASK_EXIT_IDLE;
 
 #include "tiny_plugin.h"
 
-/* Common code for rcu_idle_enter() and rcu_irq_exit(), see kernel/rcutree.c. */
+/* Common code for rcu_idle_enter() and rcu_irq_exit(), see kernel/rcu/tree.c. */
 static void rcu_idle_enter_common(long long newval)
 {
 	if (newval) {
@@ -114,7 +114,7 @@ void rcu_irq_exit(void)
 }
 EXPORT_SYMBOL_GPL(rcu_irq_exit);
 
-/* Common code for rcu_idle_exit() and rcu_irq_enter(), see kernel/rcutree.c. */
+/* Common code for rcu_idle_exit() and rcu_irq_enter(), see kernel/rcu/tree.c. */
 static void rcu_idle_exit_common(long long oldval)
 {
 	if (oldval) {
-- 
1.9.1


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

* [PATCH 2/3] rcu: Remove stale comment in tree.c
  2014-07-15 22:31 [PATCH 1/3] rcu: tiny.c: Update reference to tree.c Pranith Kumar
@ 2014-07-15 22:31 ` Pranith Kumar
  2014-07-15 22:53   ` josh
  2014-07-15 22:31 ` [PATCH 3/3] rcu: Use rcu_num_nodes instead of NUM_RCU_NODES Pranith Kumar
  2014-07-15 22:52 ` [PATCH 1/3] rcu: tiny.c: Update reference to tree.c josh
  2 siblings, 1 reply; 19+ messages in thread
From: Pranith Kumar @ 2014-07-15 22:31 UTC (permalink / raw)
  To: Paul E. McKenney, Josh Triplett, Steven Rostedt,
	Mathieu Desnoyers, Lai Jiangshan, open list:READ-COPY UPDATE...

This commit removes a stale comment in rcu/tree.c.
FYI, an updated comment exists a few lines below this.

Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
---
 kernel/rcu/tree.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index a1abaa8..e67246e 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -2211,8 +2211,6 @@ static void rcu_cleanup_dead_cpu(int cpu, struct rcu_state *rsp)
 	/* Adjust any no-longer-needed kthreads. */
 	rcu_boost_kthread_setaffinity(rnp, -1);
 
-	/* Remove the dead CPU from the bitmasks in the rcu_node hierarchy. */
-
 	/* Exclude any attempts to start a new grace period. */
 	mutex_lock(&rsp->onoff_mutex);
 	raw_spin_lock_irqsave(&rsp->orphan_lock, flags);
-- 
1.9.1


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

* [PATCH 3/3] rcu: Use rcu_num_nodes instead of NUM_RCU_NODES
  2014-07-15 22:31 [PATCH 1/3] rcu: tiny.c: Update reference to tree.c Pranith Kumar
  2014-07-15 22:31 ` [PATCH 2/3] rcu: Remove stale comment in tree.c Pranith Kumar
@ 2014-07-15 22:31 ` Pranith Kumar
  2014-07-15 22:54   ` josh
  2014-07-16 12:45   ` Paul E. McKenney
  2014-07-15 22:52 ` [PATCH 1/3] rcu: tiny.c: Update reference to tree.c josh
  2 siblings, 2 replies; 19+ messages in thread
From: Pranith Kumar @ 2014-07-15 22:31 UTC (permalink / raw)
  To: Paul E. McKenney, Josh Triplett, Steven Rostedt,
	Mathieu Desnoyers, Lai Jiangshan, open list:READ-COPY UPDATE...

NUM_RCU_NODES is set at build time and is usually a huge number. We calculate the
actual number of rcu nodes necessary at boot time based on nr_cpu_ids in
rcu_init_geometry() and store it in rcu_num_nodes. We should use this variable
instead of NUM_RCU_NODES.

This commit changes all such uses of NUM_RCU_NODES to rcu_num_nodes.

Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
---
 kernel/rcu/tree_plugin.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h
index cedb020..17ccb62 100644
--- a/kernel/rcu/tree_plugin.h
+++ b/kernel/rcu/tree_plugin.h
@@ -46,6 +46,8 @@ static bool __read_mostly rcu_nocb_poll;    /* Offload kthread are to poll. */
 static char __initdata nocb_buf[NR_CPUS * 5];
 #endif /* #ifdef CONFIG_RCU_NOCB_CPU */
 
+extern int rcu_num_nodes;
+
 /*
  * Check the RCU kernel configuration parameters and print informative
  * messages about anything out of the ordinary.  If you like #ifdef, you
@@ -885,7 +887,7 @@ void synchronize_rcu_expedited(void)
 	/* Snapshot current state of ->blkd_tasks lists. */
 	rcu_for_each_leaf_node(rsp, rnp)
 		sync_rcu_preempt_exp_init(rsp, rnp);
-	if (NUM_RCU_NODES > 1)
+	if (rcu_num_nodes > 1)
 		sync_rcu_preempt_exp_init(rsp, rcu_get_root(rsp));
 
 	put_online_cpus();
@@ -1475,7 +1477,7 @@ static void __init rcu_spawn_boost_kthreads(void)
 	BUG_ON(smpboot_register_percpu_thread(&rcu_cpu_thread_spec));
 	rnp = rcu_get_root(rcu_state_p);
 	(void)rcu_spawn_one_boost_kthread(rcu_state_p, rnp);
-	if (NUM_RCU_NODES > 1) {
+	if (rcu_num_nodes > 1) {
 		rcu_for_each_leaf_node(rcu_state_p, rnp)
 			(void)rcu_spawn_one_boost_kthread(rcu_state_p, rnp);
 	}
-- 
1.9.1


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

* Re: [PATCH 1/3] rcu: tiny.c: Update reference to tree.c
  2014-07-15 22:31 [PATCH 1/3] rcu: tiny.c: Update reference to tree.c Pranith Kumar
  2014-07-15 22:31 ` [PATCH 2/3] rcu: Remove stale comment in tree.c Pranith Kumar
  2014-07-15 22:31 ` [PATCH 3/3] rcu: Use rcu_num_nodes instead of NUM_RCU_NODES Pranith Kumar
@ 2014-07-15 22:52 ` josh
  2 siblings, 0 replies; 19+ messages in thread
From: josh @ 2014-07-15 22:52 UTC (permalink / raw)
  To: Pranith Kumar
  Cc: Paul E. McKenney, Steven Rostedt, Mathieu Desnoyers,
	Lai Jiangshan, open list:READ-COPY UPDATE...

On Tue, Jul 15, 2014 at 06:31:47PM -0400, Pranith Kumar wrote:
> This commit updates the references to rcutree.c which is now rcu/tree.c
> 
> Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>

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

>  kernel/rcu/tiny.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/kernel/rcu/tiny.c b/kernel/rcu/tiny.c
> index d9efcc1..6bd785c 100644
> --- a/kernel/rcu/tiny.c
> +++ b/kernel/rcu/tiny.c
> @@ -51,7 +51,7 @@ static long long rcu_dynticks_nesting = DYNTICK_TASK_EXIT_IDLE;
>  
>  #include "tiny_plugin.h"
>  
> -/* Common code for rcu_idle_enter() and rcu_irq_exit(), see kernel/rcutree.c. */
> +/* Common code for rcu_idle_enter() and rcu_irq_exit(), see kernel/rcu/tree.c. */
>  static void rcu_idle_enter_common(long long newval)
>  {
>  	if (newval) {
> @@ -114,7 +114,7 @@ void rcu_irq_exit(void)
>  }
>  EXPORT_SYMBOL_GPL(rcu_irq_exit);
>  
> -/* Common code for rcu_idle_exit() and rcu_irq_enter(), see kernel/rcutree.c. */
> +/* Common code for rcu_idle_exit() and rcu_irq_enter(), see kernel/rcu/tree.c. */
>  static void rcu_idle_exit_common(long long oldval)
>  {
>  	if (oldval) {
> -- 
> 1.9.1
> 

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

* Re: [PATCH 2/3] rcu: Remove stale comment in tree.c
  2014-07-15 22:31 ` [PATCH 2/3] rcu: Remove stale comment in tree.c Pranith Kumar
@ 2014-07-15 22:53   ` josh
  2014-07-15 22:57     ` Pranith Kumar
  0 siblings, 1 reply; 19+ messages in thread
From: josh @ 2014-07-15 22:53 UTC (permalink / raw)
  To: Pranith Kumar
  Cc: Paul E. McKenney, Steven Rostedt, Mathieu Desnoyers,
	Lai Jiangshan, open list:READ-COPY UPDATE...

On Tue, Jul 15, 2014 at 06:31:48PM -0400, Pranith Kumar wrote:
> This commit removes a stale comment in rcu/tree.c.
> FYI, an updated comment exists a few lines below this.
> 
> Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>

In general, when removing a stale comment, I'd suggest explaining why
the comment is stale.  Was code removed without removing the
corresponding comment, or was code changed such that the comment no
longer applies, or...?

- Josh Triplett

>  kernel/rcu/tree.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
> index a1abaa8..e67246e 100644
> --- a/kernel/rcu/tree.c
> +++ b/kernel/rcu/tree.c
> @@ -2211,8 +2211,6 @@ static void rcu_cleanup_dead_cpu(int cpu, struct rcu_state *rsp)
>  	/* Adjust any no-longer-needed kthreads. */
>  	rcu_boost_kthread_setaffinity(rnp, -1);
>  
> -	/* Remove the dead CPU from the bitmasks in the rcu_node hierarchy. */
> -
>  	/* Exclude any attempts to start a new grace period. */
>  	mutex_lock(&rsp->onoff_mutex);
>  	raw_spin_lock_irqsave(&rsp->orphan_lock, flags);
> -- 
> 1.9.1
> 

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

* Re: [PATCH 3/3] rcu: Use rcu_num_nodes instead of NUM_RCU_NODES
  2014-07-15 22:31 ` [PATCH 3/3] rcu: Use rcu_num_nodes instead of NUM_RCU_NODES Pranith Kumar
@ 2014-07-15 22:54   ` josh
  2014-07-16 12:45   ` Paul E. McKenney
  1 sibling, 0 replies; 19+ messages in thread
From: josh @ 2014-07-15 22:54 UTC (permalink / raw)
  To: Pranith Kumar
  Cc: Paul E. McKenney, Steven Rostedt, Mathieu Desnoyers,
	Lai Jiangshan, open list:READ-COPY UPDATE...

On Tue, Jul 15, 2014 at 06:31:49PM -0400, Pranith Kumar wrote:
> NUM_RCU_NODES is set at build time and is usually a huge number. We calculate the
> actual number of rcu nodes necessary at boot time based on nr_cpu_ids in
> rcu_init_geometry() and store it in rcu_num_nodes. We should use this variable
> instead of NUM_RCU_NODES.
> 
> This commit changes all such uses of NUM_RCU_NODES to rcu_num_nodes.
> 
> Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>

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

(On a separate note, these names really need to provide clearer
explanations of the difference, grumble.  Case and word order explains
little.)

>  kernel/rcu/tree_plugin.h | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h
> index cedb020..17ccb62 100644
> --- a/kernel/rcu/tree_plugin.h
> +++ b/kernel/rcu/tree_plugin.h
> @@ -46,6 +46,8 @@ static bool __read_mostly rcu_nocb_poll;    /* Offload kthread are to poll. */
>  static char __initdata nocb_buf[NR_CPUS * 5];
>  #endif /* #ifdef CONFIG_RCU_NOCB_CPU */
>  
> +extern int rcu_num_nodes;
> +
>  /*
>   * Check the RCU kernel configuration parameters and print informative
>   * messages about anything out of the ordinary.  If you like #ifdef, you
> @@ -885,7 +887,7 @@ void synchronize_rcu_expedited(void)
>  	/* Snapshot current state of ->blkd_tasks lists. */
>  	rcu_for_each_leaf_node(rsp, rnp)
>  		sync_rcu_preempt_exp_init(rsp, rnp);
> -	if (NUM_RCU_NODES > 1)
> +	if (rcu_num_nodes > 1)
>  		sync_rcu_preempt_exp_init(rsp, rcu_get_root(rsp));
>  
>  	put_online_cpus();
> @@ -1475,7 +1477,7 @@ static void __init rcu_spawn_boost_kthreads(void)
>  	BUG_ON(smpboot_register_percpu_thread(&rcu_cpu_thread_spec));
>  	rnp = rcu_get_root(rcu_state_p);
>  	(void)rcu_spawn_one_boost_kthread(rcu_state_p, rnp);
> -	if (NUM_RCU_NODES > 1) {
> +	if (rcu_num_nodes > 1) {
>  		rcu_for_each_leaf_node(rcu_state_p, rnp)
>  			(void)rcu_spawn_one_boost_kthread(rcu_state_p, rnp);
>  	}
> -- 
> 1.9.1
> 

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

* Re: [PATCH 2/3] rcu: Remove stale comment in tree.c
  2014-07-15 22:53   ` josh
@ 2014-07-15 22:57     ` Pranith Kumar
  2014-07-16 12:47       ` Paul E. McKenney
  0 siblings, 1 reply; 19+ messages in thread
From: Pranith Kumar @ 2014-07-15 22:57 UTC (permalink / raw)
  To: josh
  Cc: Paul E. McKenney, Steven Rostedt, Mathieu Desnoyers,
	Lai Jiangshan, open list:READ-COPY UPDATE...


On 07/15/2014 06:53 PM, josh@joshtriplett.org wrote:
> On Tue, Jul 15, 2014 at 06:31:48PM -0400, Pranith Kumar wrote:
>> This commit removes a stale comment in rcu/tree.c.
>> FYI, an updated comment exists a few lines below this.
>>
>> Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
> In general, when removing a stale comment, I'd suggest explaining why
> the comment is stale.  Was code removed without removing the
> corresponding comment, or was code changed such that the comment no
> longer applies, or...?

I guess it was left out when code was moved around previously. And I did mention that an updated comment is there a few lines below.

For reference this is the new comment which is below the old comment, they mean the same :)

    /* Remove the outgoing CPU from the masks in the rcu_node hierarchy. */

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

* Re: [PATCH 3/3] rcu: Use rcu_num_nodes instead of NUM_RCU_NODES
  2014-07-15 22:31 ` [PATCH 3/3] rcu: Use rcu_num_nodes instead of NUM_RCU_NODES Pranith Kumar
  2014-07-15 22:54   ` josh
@ 2014-07-16 12:45   ` Paul E. McKenney
  2014-07-16 13:26     ` Pranith Kumar
  1 sibling, 1 reply; 19+ messages in thread
From: Paul E. McKenney @ 2014-07-16 12:45 UTC (permalink / raw)
  To: Pranith Kumar
  Cc: Josh Triplett, Steven Rostedt, Mathieu Desnoyers, Lai Jiangshan,
	open list:READ-COPY UPDATE...

On Tue, Jul 15, 2014 at 06:31:49PM -0400, Pranith Kumar wrote:
> NUM_RCU_NODES is set at build time and is usually a huge number. We calculate the
> actual number of rcu nodes necessary at boot time based on nr_cpu_ids in
> rcu_init_geometry() and store it in rcu_num_nodes. We should use this variable
> instead of NUM_RCU_NODES.
> 
> This commit changes all such uses of NUM_RCU_NODES to rcu_num_nodes.
> 
> Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
> ---
>  kernel/rcu/tree_plugin.h | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h
> index cedb020..17ccb62 100644
> --- a/kernel/rcu/tree_plugin.h
> +++ b/kernel/rcu/tree_plugin.h
> @@ -46,6 +46,8 @@ static bool __read_mostly rcu_nocb_poll;    /* Offload kthread are to poll. */
>  static char __initdata nocb_buf[NR_CPUS * 5];
>  #endif /* #ifdef CONFIG_RCU_NOCB_CPU */
> 
> +extern int rcu_num_nodes;

This should not be necessary given the existing declaration in
kernel/rcu/tree.c way before the #include of kernel/rcu/tree_plugin.h.

Or did you get a build failure without this?  (And if you did get a build
failure, I would be really curious how that happened!)

So please send an updated patch or tell me how your build managed to fail.

> +
>  /*
>   * Check the RCU kernel configuration parameters and print informative
>   * messages about anything out of the ordinary.  If you like #ifdef, you
> @@ -885,7 +887,7 @@ void synchronize_rcu_expedited(void)
>  	/* Snapshot current state of ->blkd_tasks lists. */
>  	rcu_for_each_leaf_node(rsp, rnp)
>  		sync_rcu_preempt_exp_init(rsp, rnp);
> -	if (NUM_RCU_NODES > 1)
> +	if (rcu_num_nodes > 1)
>  		sync_rcu_preempt_exp_init(rsp, rcu_get_root(rsp));
> 
>  	put_online_cpus();
> @@ -1475,7 +1477,7 @@ static void __init rcu_spawn_boost_kthreads(void)
>  	BUG_ON(smpboot_register_percpu_thread(&rcu_cpu_thread_spec));
>  	rnp = rcu_get_root(rcu_state_p);
>  	(void)rcu_spawn_one_boost_kthread(rcu_state_p, rnp);
> -	if (NUM_RCU_NODES > 1) {
> +	if (rcu_num_nodes > 1) {
>  		rcu_for_each_leaf_node(rcu_state_p, rnp)
>  			(void)rcu_spawn_one_boost_kthread(rcu_state_p, rnp);
>  	}

For whatever it is worth, the reason that this works is that it is a
perforamnce optimzation and NUM_RCU_NODES is always greater than or
equal to num_rcu_nodes.  Still, your change is a good one.

							Thanx, Paul


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

* Re: [PATCH 2/3] rcu: Remove stale comment in tree.c
  2014-07-15 22:57     ` Pranith Kumar
@ 2014-07-16 12:47       ` Paul E. McKenney
  2014-07-16 13:29         ` Pranith Kumar
  0 siblings, 1 reply; 19+ messages in thread
From: Paul E. McKenney @ 2014-07-16 12:47 UTC (permalink / raw)
  To: Pranith Kumar
  Cc: josh, Steven Rostedt, Mathieu Desnoyers, Lai Jiangshan,
	open list:READ-COPY UPDATE...

On Tue, Jul 15, 2014 at 06:57:59PM -0400, Pranith Kumar wrote:
> 
> On 07/15/2014 06:53 PM, josh@joshtriplett.org wrote:
> > On Tue, Jul 15, 2014 at 06:31:48PM -0400, Pranith Kumar wrote:
> >> This commit removes a stale comment in rcu/tree.c.
> >> FYI, an updated comment exists a few lines below this.
> >>
> >> Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
> > In general, when removing a stale comment, I'd suggest explaining why
> > the comment is stale.  Was code removed without removing the
> > corresponding comment, or was code changed such that the comment no
> > longer applies, or...?
> 
> I guess it was left out when code was moved around previously. And I did mention that an updated comment is there a few lines below.
> 
> For reference this is the new comment which is below the old comment, they mean the same :)
> 
>     /* Remove the outgoing CPU from the masks in the rcu_node hierarchy. */

Indeed that is the case.

Please update the commit log with this explanation and resend.

								Thanx, Paul


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

* Re: [PATCH 3/3] rcu: Use rcu_num_nodes instead of NUM_RCU_NODES
  2014-07-16 12:45   ` Paul E. McKenney
@ 2014-07-16 13:26     ` Pranith Kumar
  0 siblings, 0 replies; 19+ messages in thread
From: Pranith Kumar @ 2014-07-16 13:26 UTC (permalink / raw)
  To: paulmck
  Cc: Josh Triplett, Steven Rostedt, Mathieu Desnoyers, Lai Jiangshan,
	open list:READ-COPY UPDATE...

On 07/16/2014 08:45 AM, Paul E. McKenney wrote:
> On Tue, Jul 15, 2014 at 06:31:49PM -0400, Pranith Kumar wrote:
>> NUM_RCU_NODES is set at build time and is usually a huge number. We calculate the
>> actual number of rcu nodes necessary at boot time based on nr_cpu_ids in
>> rcu_init_geometry() and store it in rcu_num_nodes. We should use this variable
>> instead of NUM_RCU_NODES.
>>
>> This commit changes all such uses of NUM_RCU_NODES to rcu_num_nodes.
>>
>> Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
>> ---
>>  kernel/rcu/tree_plugin.h | 6 ++++--
>>  1 file changed, 4 insertions(+), 2 deletions(-)
>>
>> diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h
>> index cedb020..17ccb62 100644
>> --- a/kernel/rcu/tree_plugin.h
>> +++ b/kernel/rcu/tree_plugin.h
>> @@ -46,6 +46,8 @@ static bool __read_mostly rcu_nocb_poll;    /* Offload kthread are to poll. */
>>  static char __initdata nocb_buf[NR_CPUS * 5];
>>  #endif /* #ifdef CONFIG_RCU_NOCB_CPU */
>>
>> +extern int rcu_num_nodes;
> 
> This should not be necessary given the existing declaration in
> kernel/rcu/tree.c way before the #include of kernel/rcu/tree_plugin.h.
> 
> Or did you get a build failure without this?  (And if you did get a build
> failure, I would be really curious how that happened!)
> 
> So please send an updated patch or tell me how your build managed to fail.
> 

Indeed. The extern was unnecessary. Please find an updated patch below.

--
Pranith

From: Pranith Kumar <bobby.prani@gmail.com>
Date: Wed, 16 Jul 2014 09:21:49 -0400
Subject: [PATCH 1/1] rcu: Use rcu_num_nodes instead of NUM_RCU_NODES

NUM_RCU_NODES is set at build time and is usually a huge number. We calculate the
actual number of rcu nodes necessary at boot time based on nr_cpu_ids in
rcu_init_geometry() and store it in rcu_num_nodes. We should use this variable
instead of NUM_RCU_NODES.

This commit changes all such uses of NUM_RCU_NODES to rcu_num_nodes.

Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
---
 kernel/rcu/tree_plugin.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h
index cedb020..b99055a 100644
--- a/kernel/rcu/tree_plugin.h
+++ b/kernel/rcu/tree_plugin.h
@@ -885,7 +885,7 @@ void synchronize_rcu_expedited(void)
 	/* Snapshot current state of ->blkd_tasks lists. */
 	rcu_for_each_leaf_node(rsp, rnp)
 		sync_rcu_preempt_exp_init(rsp, rnp);
-	if (NUM_RCU_NODES > 1)
+	if (rcu_num_nodes > 1)
 		sync_rcu_preempt_exp_init(rsp, rcu_get_root(rsp));
 
 	put_online_cpus();
@@ -1475,7 +1475,7 @@ static void __init rcu_spawn_boost_kthreads(void)
 	BUG_ON(smpboot_register_percpu_thread(&rcu_cpu_thread_spec));
 	rnp = rcu_get_root(rcu_state_p);
 	(void)rcu_spawn_one_boost_kthread(rcu_state_p, rnp);
-	if (NUM_RCU_NODES > 1) {
+	if (rcu_num_nodes > 1) {
 		rcu_for_each_leaf_node(rcu_state_p, rnp)
 			(void)rcu_spawn_one_boost_kthread(rcu_state_p, rnp);
 	}
-- 
1.9.1



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

* Re: [PATCH 2/3] rcu: Remove stale comment in tree.c
  2014-07-16 12:47       ` Paul E. McKenney
@ 2014-07-16 13:29         ` Pranith Kumar
  2014-07-16 23:32           ` josh
  2014-07-17  0:55           ` Lai Jiangshan
  0 siblings, 2 replies; 19+ messages in thread
From: Pranith Kumar @ 2014-07-16 13:29 UTC (permalink / raw)
  To: paulmck
  Cc: josh, Steven Rostedt, Mathieu Desnoyers, Lai Jiangshan,
	open list:READ-COPY UPDATE...

On 07/16/2014 08:47 AM, Paul E. McKenney wrote:
> On Tue, Jul 15, 2014 at 06:57:59PM -0400, Pranith Kumar wrote:
>>
>> On 07/15/2014 06:53 PM, josh@joshtriplett.org wrote:
>>> On Tue, Jul 15, 2014 at 06:31:48PM -0400, Pranith Kumar wrote:
>>>> This commit removes a stale comment in rcu/tree.c.
>>>> FYI, an updated comment exists a few lines below this.
>>>>
>>>> Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
>>> In general, when removing a stale comment, I'd suggest explaining why
>>> the comment is stale.  Was code removed without removing the
>>> corresponding comment, or was code changed such that the comment no
>>> longer applies, or...?
>>
>> I guess it was left out when code was moved around previously. And I did mention that an updated comment is there a few lines below.
>>
>> For reference this is the new comment which is below the old comment, they mean the same :)
>>
>>     /* Remove the outgoing CPU from the masks in the rcu_node hierarchy. */
> 
> Indeed that is the case.
> 
> Please update the commit log with this explanation and resend.
> 
> 								Thanx, Paul
> 

Please find the updated patch below.

--
Pranith

From: Pranith Kumar <bobby.prani@gmail.com>
Date: Mon, 14 Jul 2014 16:01:05 -0400
Subject: [PATCH 2/3] rcu: Remove stale comment in tree.c

This commit removes a stale comment in rcu/tree.c which was left out when some
code was moved around previously.

For reference, the following updated comment exists a few lines below this which
means the same.

/* Remove the outgoing CPU from the masks in the rcu_node hierarchy. */

Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
---
 kernel/rcu/tree.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index a1abaa8..e67246e 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -2211,8 +2211,6 @@ static void rcu_cleanup_dead_cpu(int cpu, struct rcu_state *rsp)
 	/* Adjust any no-longer-needed kthreads. */
 	rcu_boost_kthread_setaffinity(rnp, -1);
 
-	/* Remove the dead CPU from the bitmasks in the rcu_node hierarchy. */
-
 	/* Exclude any attempts to start a new grace period. */
 	mutex_lock(&rsp->onoff_mutex);
 	raw_spin_lock_irqsave(&rsp->orphan_lock, flags);
-- 
1.9.1


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

* Re: [PATCH 2/3] rcu: Remove stale comment in tree.c
  2014-07-16 13:29         ` Pranith Kumar
@ 2014-07-16 23:32           ` josh
  2014-07-17  0:55           ` Lai Jiangshan
  1 sibling, 0 replies; 19+ messages in thread
From: josh @ 2014-07-16 23:32 UTC (permalink / raw)
  To: Pranith Kumar
  Cc: paulmck, Steven Rostedt, Mathieu Desnoyers, Lai Jiangshan,
	open list:READ-COPY UPDATE...

On Wed, Jul 16, 2014 at 09:29:18AM -0400, Pranith Kumar wrote:
> On 07/16/2014 08:47 AM, Paul E. McKenney wrote:
> > On Tue, Jul 15, 2014 at 06:57:59PM -0400, Pranith Kumar wrote:
> >>
> >> On 07/15/2014 06:53 PM, josh@joshtriplett.org wrote:
> >>> On Tue, Jul 15, 2014 at 06:31:48PM -0400, Pranith Kumar wrote:
> >>>> This commit removes a stale comment in rcu/tree.c.
> >>>> FYI, an updated comment exists a few lines below this.
> >>>>
> >>>> Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
> >>> In general, when removing a stale comment, I'd suggest explaining why
> >>> the comment is stale.  Was code removed without removing the
> >>> corresponding comment, or was code changed such that the comment no
> >>> longer applies, or...?
> >>
> >> I guess it was left out when code was moved around previously. And I did mention that an updated comment is there a few lines below.
> >>
> >> For reference this is the new comment which is below the old comment, they mean the same :)
> >>
> >>     /* Remove the outgoing CPU from the masks in the rcu_node hierarchy. */
> > 
> > Indeed that is the case.
> > 
> > Please update the commit log with this explanation and resend.
> > 
> > 								Thanx, Paul
> > 
> 
> Please find the updated patch below.
> 
> --
> Pranith
> 
> From: Pranith Kumar <bobby.prani@gmail.com>
> Date: Mon, 14 Jul 2014 16:01:05 -0400
> Subject: [PATCH 2/3] rcu: Remove stale comment in tree.c
> 
> This commit removes a stale comment in rcu/tree.c which was left out when some
> code was moved around previously.
> 
> For reference, the following updated comment exists a few lines below this which
> means the same.
> 
> /* Remove the outgoing CPU from the masks in the rcu_node hierarchy. */
> 
> Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>

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

>  kernel/rcu/tree.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
> index a1abaa8..e67246e 100644
> --- a/kernel/rcu/tree.c
> +++ b/kernel/rcu/tree.c
> @@ -2211,8 +2211,6 @@ static void rcu_cleanup_dead_cpu(int cpu, struct rcu_state *rsp)
>  	/* Adjust any no-longer-needed kthreads. */
>  	rcu_boost_kthread_setaffinity(rnp, -1);
>  
> -	/* Remove the dead CPU from the bitmasks in the rcu_node hierarchy. */
> -
>  	/* Exclude any attempts to start a new grace period. */
>  	mutex_lock(&rsp->onoff_mutex);
>  	raw_spin_lock_irqsave(&rsp->orphan_lock, flags);
> -- 
> 1.9.1
> 

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

* Re: [PATCH 2/3] rcu: Remove stale comment in tree.c
  2014-07-16 13:29         ` Pranith Kumar
  2014-07-16 23:32           ` josh
@ 2014-07-17  0:55           ` Lai Jiangshan
  2014-07-17  1:01             ` Pranith Kumar
  1 sibling, 1 reply; 19+ messages in thread
From: Lai Jiangshan @ 2014-07-17  0:55 UTC (permalink / raw)
  To: Pranith Kumar
  Cc: paulmck, josh, Steven Rostedt, Mathieu Desnoyers,
	open list:READ-COPY UPDATE...

On 07/16/2014 09:29 PM, Pranith Kumar wrote:
> On 07/16/2014 08:47 AM, Paul E. McKenney wrote:
>> On Tue, Jul 15, 2014 at 06:57:59PM -0400, Pranith Kumar wrote:
>>>
>>> On 07/15/2014 06:53 PM, josh@joshtriplett.org wrote:
>>>> On Tue, Jul 15, 2014 at 06:31:48PM -0400, Pranith Kumar wrote:
>>>>> This commit removes a stale comment in rcu/tree.c.
>>>>> FYI, an updated comment exists a few lines below this.
>>>>>
>>>>> Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
>>>> In general, when removing a stale comment, I'd suggest explaining why
>>>> the comment is stale.  Was code removed without removing the
>>>> corresponding comment, or was code changed such that the comment no
>>>> longer applies, or...?
>>>
>>> I guess it was left out when code was moved around previously. And I did mention that an updated comment is there a few lines below.
>>>
>>> For reference this is the new comment which is below the old comment, they mean the same :)
>>>
>>>     /* Remove the outgoing CPU from the masks in the rcu_node hierarchy. */
>>
>> Indeed that is the case.
>>
>> Please update the commit log with this explanation and resend.
>>
>> 								Thanx, Paul
>>
> 
> Please find the updated patch below.
> 
> --
> Pranith
> 
> From: Pranith Kumar <bobby.prani@gmail.com>
> Date: Mon, 14 Jul 2014 16:01:05 -0400
> Subject: [PATCH 2/3] rcu: Remove stale comment in tree.c
> 
> This commit removes a stale comment in rcu/tree.c which was left out when some
> code was moved around previously.

Which commit caused this leftover comment? Could you mention that commit in
your changlog?

12BitsCmmtID ("commit title...")

> 
> For reference, the following updated comment exists a few lines below this which
> means the same.
> 
> /* Remove the outgoing CPU from the masks in the rcu_node hierarchy. */
> 
> Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
> ---
>  kernel/rcu/tree.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
> index a1abaa8..e67246e 100644
> --- a/kernel/rcu/tree.c
> +++ b/kernel/rcu/tree.c
> @@ -2211,8 +2211,6 @@ static void rcu_cleanup_dead_cpu(int cpu, struct rcu_state *rsp)
>  	/* Adjust any no-longer-needed kthreads. */
>  	rcu_boost_kthread_setaffinity(rnp, -1);
>  
> -	/* Remove the dead CPU from the bitmasks in the rcu_node hierarchy. */
> -
>  	/* Exclude any attempts to start a new grace period. */
>  	mutex_lock(&rsp->onoff_mutex);
>  	raw_spin_lock_irqsave(&rsp->orphan_lock, flags);


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

* Re: [PATCH 2/3] rcu: Remove stale comment in tree.c
  2014-07-17  0:55           ` Lai Jiangshan
@ 2014-07-17  1:01             ` Pranith Kumar
  2014-07-17  1:25               ` Lai Jiangshan
  2014-07-17  2:14               ` Josh Triplett
  0 siblings, 2 replies; 19+ messages in thread
From: Pranith Kumar @ 2014-07-17  1:01 UTC (permalink / raw)
  To: Lai Jiangshan
  Cc: paulmck, josh, Steven Rostedt, Mathieu Desnoyers,
	open list:READ-COPY UPDATE...

On 07/16/2014 08:55 PM, Lai Jiangshan wrote:
> On 07/16/2014 09:29 PM, Pranith Kumar wrote:
>> On 07/16/2014 08:47 AM, Paul E. McKenney wrote:
>>> On Tue, Jul 15, 2014 at 06:57:59PM -0400, Pranith Kumar wrote:
>>>>
>>>> On 07/15/2014 06:53 PM, josh@joshtriplett.org wrote:
>>>>> On Tue, Jul 15, 2014 at 06:31:48PM -0400, Pranith Kumar wrote:
>>>>>> This commit removes a stale comment in rcu/tree.c.
>>>>>> FYI, an updated comment exists a few lines below this.
>>>>>>
>>>>>> Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
>>>>> In general, when removing a stale comment, I'd suggest explaining why
>>>>> the comment is stale.  Was code removed without removing the
>>>>> corresponding comment, or was code changed such that the comment no
>>>>> longer applies, or...?
>>>>
>>>> I guess it was left out when code was moved around previously. And I did mention that an updated comment is there a few lines below.
>>>>
>>>> For reference this is the new comment which is below the old comment, they mean the same :)
>>>>
>>>>     /* Remove the outgoing CPU from the masks in the rcu_node hierarchy. */
>>>
>>> Indeed that is the case.
>>>
>>> Please update the commit log with this explanation and resend.
>>>
>>> 								Thanx, Paul
>>>
>>
>> Please find the updated patch below.
>>
>> --
>> Pranith
>>
>> From: Pranith Kumar <bobby.prani@gmail.com>
>> Date: Mon, 14 Jul 2014 16:01:05 -0400
>> Subject: [PATCH 2/3] rcu: Remove stale comment in tree.c
>>
>> This commit removes a stale comment in rcu/tree.c which was left out when some
>> code was moved around previously.
> 
> Which commit caused this leftover comment? Could you mention that commit in
> your changlog?
> 
> 12BitsCmmtID ("commit title...")
> 

Sure, please find an updated patch with Josh Triplett's sign-off added:

From: Pranith Kumar <bobby.prani@gmail.com>
Date: Mon, 14 Jul 2014 16:01:05 -0400
Subject: [PATCH 2/3] rcu: Remove stale comment in tree.c


This commit removes a stale comment in rcu/tree.c which was left out in
commit 2036d94a7b61ca5032ce (rcu:  Rework detection of use of RCU by offline CPUs)

For reference, the following updated comment exists a few lines below this which
means the same.

/* Remove the outgoing CPU from the masks in the rcu_node hierarchy. */

Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
Reviewed-by: Joe Tripplett <josh@joshtriplett.org>
---
 kernel/rcu/tree.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index a1abaa8..e67246e 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -2211,8 +2211,6 @@ static void rcu_cleanup_dead_cpu(int cpu, struct rcu_state *rsp)
 	/* Adjust any no-longer-needed kthreads. */
 	rcu_boost_kthread_setaffinity(rnp, -1);
 
-	/* Remove the dead CPU from the bitmasks in the rcu_node hierarchy. */
-
 	/* Exclude any attempts to start a new grace period. */
 	mutex_lock(&rsp->onoff_mutex);
 	raw_spin_lock_irqsave(&rsp->orphan_lock, flags);
-- 
1.9.1


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

* Re: [PATCH 2/3] rcu: Remove stale comment in tree.c
  2014-07-17  1:01             ` Pranith Kumar
@ 2014-07-17  1:25               ` Lai Jiangshan
  2014-07-17  1:26                 ` Pranith Kumar
  2014-07-17  2:14               ` Josh Triplett
  1 sibling, 1 reply; 19+ messages in thread
From: Lai Jiangshan @ 2014-07-17  1:25 UTC (permalink / raw)
  To: Pranith Kumar
  Cc: paulmck, josh, Steven Rostedt, Mathieu Desnoyers,
	open list:READ-COPY UPDATE...

On 07/17/2014 09:01 AM, Pranith Kumar wrote:
> On 07/16/2014 08:55 PM, Lai Jiangshan wrote:
>> On 07/16/2014 09:29 PM, Pranith Kumar wrote:
>>> On 07/16/2014 08:47 AM, Paul E. McKenney wrote:
>>>> On Tue, Jul 15, 2014 at 06:57:59PM -0400, Pranith Kumar wrote:
>>>>>
>>>>> On 07/15/2014 06:53 PM, josh@joshtriplett.org wrote:
>>>>>> On Tue, Jul 15, 2014 at 06:31:48PM -0400, Pranith Kumar wrote:
>>>>>>> This commit removes a stale comment in rcu/tree.c.
>>>>>>> FYI, an updated comment exists a few lines below this.
>>>>>>>
>>>>>>> Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
>>>>>> In general, when removing a stale comment, I'd suggest explaining why
>>>>>> the comment is stale.  Was code removed without removing the
>>>>>> corresponding comment, or was code changed such that the comment no
>>>>>> longer applies, or...?
>>>>>
>>>>> I guess it was left out when code was moved around previously. And I did mention that an updated comment is there a few lines below.
>>>>>
>>>>> For reference this is the new comment which is below the old comment, they mean the same :)
>>>>>
>>>>>     /* Remove the outgoing CPU from the masks in the rcu_node hierarchy. */
>>>>
>>>> Indeed that is the case.
>>>>
>>>> Please update the commit log with this explanation and resend.
>>>>
>>>> 								Thanx, Paul
>>>>
>>>
>>> Please find the updated patch below.
>>>
>>> --
>>> Pranith
>>>
>>> From: Pranith Kumar <bobby.prani@gmail.com>
>>> Date: Mon, 14 Jul 2014 16:01:05 -0400
>>> Subject: [PATCH 2/3] rcu: Remove stale comment in tree.c
>>>
>>> This commit removes a stale comment in rcu/tree.c which was left out when some
>>> code was moved around previously.
>>
>> Which commit caused this leftover comment? Could you mention that commit in
>> your changlog?
>>
>> 12BitsCmmtID ("commit title...")
>>
> 
> Sure, please find an updated patch with Josh Triplett's sign-off added:
> 
> From: Pranith Kumar <bobby.prani@gmail.com>
> Date: Mon, 14 Jul 2014 16:01:05 -0400
> Subject: [PATCH 2/3] rcu: Remove stale comment in tree.c
> 
> 
> This commit removes a stale comment in rcu/tree.c which was left out in
> commit 2036d94a7b61ca5032ce (rcu:  Rework detection of use of RCU by offline CPUs)

I suggest you use the following syntax in future.

2036d94a7b61 ("rcu:  Rework detection of use of RCU by offline CPUs")

> 
> For reference, the following updated comment exists a few lines below this which
> means the same.
> 
> /* Remove the outgoing CPU from the masks in the rcu_node hierarchy. */
> 
> Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
> Reviewed-by: Joe Tripplett <josh@joshtriplett.org>

Reviewed-by: Lai Jiangshan <laijs@cn.fujitsu.com>

> ---
>  kernel/rcu/tree.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
> index a1abaa8..e67246e 100644
> --- a/kernel/rcu/tree.c
> +++ b/kernel/rcu/tree.c
> @@ -2211,8 +2211,6 @@ static void rcu_cleanup_dead_cpu(int cpu, struct rcu_state *rsp)
>  	/* Adjust any no-longer-needed kthreads. */
>  	rcu_boost_kthread_setaffinity(rnp, -1);
>  
> -	/* Remove the dead CPU from the bitmasks in the rcu_node hierarchy. */
> -
>  	/* Exclude any attempts to start a new grace period. */
>  	mutex_lock(&rsp->onoff_mutex);
>  	raw_spin_lock_irqsave(&rsp->orphan_lock, flags);


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

* Re: [PATCH 2/3] rcu: Remove stale comment in tree.c
  2014-07-17  1:25               ` Lai Jiangshan
@ 2014-07-17  1:26                 ` Pranith Kumar
  0 siblings, 0 replies; 19+ messages in thread
From: Pranith Kumar @ 2014-07-17  1:26 UTC (permalink / raw)
  To: Lai Jiangshan
  Cc: paulmck, josh, Steven Rostedt, Mathieu Desnoyers,
	open list:READ-COPY UPDATE...

On 07/16/2014 09:25 PM, Lai Jiangshan wrote:
> On 07/17/2014 09:01 AM, Pranith Kumar wrote:
>> On 07/16/2014 08:55 PM, Lai Jiangshan wrote:
>>> On 07/16/2014 09:29 PM, Pranith Kumar wrote:
>>>> On 07/16/2014 08:47 AM, Paul E. McKenney wrote:
>>>>> On Tue, Jul 15, 2014 at 06:57:59PM -0400, Pranith Kumar wrote:
>>>>>>
>>>>>> On 07/15/2014 06:53 PM, josh@joshtriplett.org wrote:
>>>>>>> On Tue, Jul 15, 2014 at 06:31:48PM -0400, Pranith Kumar wrote:
>>>>>>>> This commit removes a stale comment in rcu/tree.c.
>>>>>>>> FYI, an updated comment exists a few lines below this.
>>>>>>>>
>>>>>>>> Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
>>>>>>> In general, when removing a stale comment, I'd suggest explaining why
>>>>>>> the comment is stale.  Was code removed without removing the
>>>>>>> corresponding comment, or was code changed such that the comment no
>>>>>>> longer applies, or...?
>>>>>>
>>>>>> I guess it was left out when code was moved around previously. And I did mention that an updated comment is there a few lines below.
>>>>>>
>>>>>> For reference this is the new comment which is below the old comment, they mean the same :)
>>>>>>
>>>>>>     /* Remove the outgoing CPU from the masks in the rcu_node hierarchy. */
>>>>>
>>>>> Indeed that is the case.
>>>>>
>>>>> Please update the commit log with this explanation and resend.
>>>>>
>>>>> 								Thanx, Paul
>>>>>
>>>>
>>>> Please find the updated patch below.
>>>>
>>>> --
>>>> Pranith
>>>>
>>>> From: Pranith Kumar <bobby.prani@gmail.com>
>>>> Date: Mon, 14 Jul 2014 16:01:05 -0400
>>>> Subject: [PATCH 2/3] rcu: Remove stale comment in tree.c
>>>>
>>>> This commit removes a stale comment in rcu/tree.c which was left out when some
>>>> code was moved around previously.
>>>
>>> Which commit caused this leftover comment? Could you mention that commit in
>>> your changlog?
>>>
>>> 12BitsCmmtID ("commit title...")
>>>
>>
>> Sure, please find an updated patch with Josh Triplett's sign-off added:
>>
>> From: Pranith Kumar <bobby.prani@gmail.com>
>> Date: Mon, 14 Jul 2014 16:01:05 -0400
>> Subject: [PATCH 2/3] rcu: Remove stale comment in tree.c
>>
>>
>> This commit removes a stale comment in rcu/tree.c which was left out in
>> commit 2036d94a7b61ca5032ce (rcu:  Rework detection of use of RCU by offline CPUs)
> 
> I suggest you use the following syntax in future.
> 
> 2036d94a7b61 ("rcu:  Rework detection of use of RCU by offline CPUs")
> 

OK. I will do that from now on. Thanks! :)

--
Pranith

>>
>> For reference, the following updated comment exists a few lines below this which
>> means the same.
>>
>> /* Remove the outgoing CPU from the masks in the rcu_node hierarchy. */
>>
>> Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
>> Reviewed-by: Joe Tripplett <josh@joshtriplett.org>
> 
> Reviewed-by: Lai Jiangshan <laijs@cn.fujitsu.com>
> 
>> ---
>>  kernel/rcu/tree.c | 2 --
>>  1 file changed, 2 deletions(-)
>>
>> diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
>> index a1abaa8..e67246e 100644
>> --- a/kernel/rcu/tree.c
>> +++ b/kernel/rcu/tree.c
>> @@ -2211,8 +2211,6 @@ static void rcu_cleanup_dead_cpu(int cpu, struct rcu_state *rsp)
>>  	/* Adjust any no-longer-needed kthreads. */
>>  	rcu_boost_kthread_setaffinity(rnp, -1);
>>  
>> -	/* Remove the dead CPU from the bitmasks in the rcu_node hierarchy. */
>> -
>>  	/* Exclude any attempts to start a new grace period. */
>>  	mutex_lock(&rsp->onoff_mutex);
>>  	raw_spin_lock_irqsave(&rsp->orphan_lock, flags);
> 


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

* Re: [PATCH 2/3] rcu: Remove stale comment in tree.c
  2014-07-17  1:01             ` Pranith Kumar
  2014-07-17  1:25               ` Lai Jiangshan
@ 2014-07-17  2:14               ` Josh Triplett
  2014-07-17  2:20                 ` Pranith Kumar
  1 sibling, 1 reply; 19+ messages in thread
From: Josh Triplett @ 2014-07-17  2:14 UTC (permalink / raw)
  To: Pranith Kumar
  Cc: Lai Jiangshan, paulmck, Steven Rostedt, Mathieu Desnoyers,
	open list:READ-COPY UPDATE...

On Wed, Jul 16, 2014 at 09:01:52PM -0400, Pranith Kumar wrote:
> Sure, please find an updated patch with Josh Triplett's sign-off added:

It appears to have a reviewed-by from someone named "Joe Tripplett"
instead. ;)

> From: Pranith Kumar <bobby.prani@gmail.com>
> Date: Mon, 14 Jul 2014 16:01:05 -0400
> Subject: [PATCH 2/3] rcu: Remove stale comment in tree.c
> 
> 
> This commit removes a stale comment in rcu/tree.c which was left out in
> commit 2036d94a7b61ca5032ce (rcu:  Rework detection of use of RCU by offline CPUs)
> 
> For reference, the following updated comment exists a few lines below this which
> means the same.
> 
> /* Remove the outgoing CPU from the masks in the rcu_node hierarchy. */
> 
> Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
> Reviewed-by: Joe Tripplett <josh@joshtriplett.org>
> ---
>  kernel/rcu/tree.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
> index a1abaa8..e67246e 100644
> --- a/kernel/rcu/tree.c
> +++ b/kernel/rcu/tree.c
> @@ -2211,8 +2211,6 @@ static void rcu_cleanup_dead_cpu(int cpu, struct rcu_state *rsp)
>  	/* Adjust any no-longer-needed kthreads. */
>  	rcu_boost_kthread_setaffinity(rnp, -1);
>  
> -	/* Remove the dead CPU from the bitmasks in the rcu_node hierarchy. */
> -
>  	/* Exclude any attempts to start a new grace period. */
>  	mutex_lock(&rsp->onoff_mutex);
>  	raw_spin_lock_irqsave(&rsp->orphan_lock, flags);
> -- 
> 1.9.1
> 

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

* Re: [PATCH 2/3] rcu: Remove stale comment in tree.c
  2014-07-17  2:14               ` Josh Triplett
@ 2014-07-17  2:20                 ` Pranith Kumar
  2014-07-17 23:33                   ` Paul E. McKenney
  0 siblings, 1 reply; 19+ messages in thread
From: Pranith Kumar @ 2014-07-17  2:20 UTC (permalink / raw)
  To: Josh Triplett
  Cc: Lai Jiangshan, paulmck, Steven Rostedt, Mathieu Desnoyers,
	open list:READ-COPY UPDATE...

On 07/16/2014 10:14 PM, Josh Triplett wrote:
> On Wed, Jul 16, 2014 at 09:01:52PM -0400, Pranith Kumar wrote:
>> Sure, please find an updated patch with Josh Triplett's sign-off added:
> 
> It appears to have a reviewed-by from someone named "Joe Tripplett"
> instead. ;)
> 

I apologize for fat-fingering this.
Since I've sent one too many emails in this thread already, I suppose on more can not do much harm :)

This time with Reviewed-by Lai Jiangshan added and Reviewed-by Josh Triplett corrected.

From: Pranith Kumar <bobby.prani@gmail.com>
Date: Mon, 14 Jul 2014 16:01:05 -0400
Subject: [PATCH 2/3] rcu: Remove stale comment in tree.c

This commit removes a stale comment in rcu/tree.c which was left out when some
code was moved around previously in the commit

2036d94a7b61 ("rcu:  Rework detection of use of RCU by offline CPUs")

For reference, the following updated comment exists a few lines below this which
means the same.

/* Remove the outgoing CPU from the masks in the rcu_node hierarchy. */

Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Reviewed-by: Lai Jiangshan <laijs@cn.fujitsu.com>
---
 kernel/rcu/tree.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index a1abaa8..e67246e 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -2211,8 +2211,6 @@ static void rcu_cleanup_dead_cpu(int cpu, struct rcu_state *rsp)
 	/* Adjust any no-longer-needed kthreads. */
 	rcu_boost_kthread_setaffinity(rnp, -1);
 
-	/* Remove the dead CPU from the bitmasks in the rcu_node hierarchy. */
-
 	/* Exclude any attempts to start a new grace period. */
 	mutex_lock(&rsp->onoff_mutex);
 	raw_spin_lock_irqsave(&rsp->orphan_lock, flags);
-- 
1.9.1



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

* Re: [PATCH 2/3] rcu: Remove stale comment in tree.c
  2014-07-17  2:20                 ` Pranith Kumar
@ 2014-07-17 23:33                   ` Paul E. McKenney
  0 siblings, 0 replies; 19+ messages in thread
From: Paul E. McKenney @ 2014-07-17 23:33 UTC (permalink / raw)
  To: Pranith Kumar
  Cc: Josh Triplett, Lai Jiangshan, Steven Rostedt, Mathieu Desnoyers,
	open list:READ-COPY UPDATE...

On Wed, Jul 16, 2014 at 10:20:33PM -0400, Pranith Kumar wrote:
> On 07/16/2014 10:14 PM, Josh Triplett wrote:
> > On Wed, Jul 16, 2014 at 09:01:52PM -0400, Pranith Kumar wrote:
> >> Sure, please find an updated patch with Josh Triplett's sign-off added:
> > 
> > It appears to have a reviewed-by from someone named "Joe Tripplett"
> > instead. ;)
> > 
> 
> I apologize for fat-fingering this.
> Since I've sent one too many emails in this thread already, I suppose on more can not do much harm :)
> 
> This time with Reviewed-by Lai Jiangshan added and Reviewed-by Josh Triplett corrected.
> 
> From: Pranith Kumar <bobby.prani@gmail.com>
> Date: Mon, 14 Jul 2014 16:01:05 -0400
> Subject: [PATCH 2/3] rcu: Remove stale comment in tree.c
> 
> This commit removes a stale comment in rcu/tree.c which was left out when some
> code was moved around previously in the commit
> 
> 2036d94a7b61 ("rcu:  Rework detection of use of RCU by offline CPUs")
> 
> For reference, the following updated comment exists a few lines below this which
> means the same.
> 
> /* Remove the outgoing CPU from the masks in the rcu_node hierarchy. */
> 
> Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
> Reviewed-by: Lai Jiangshan <laijs@cn.fujitsu.com>

Queued for 3.18, thank you all!

							Thanx, Paul

> ---
>  kernel/rcu/tree.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
> index a1abaa8..e67246e 100644
> --- a/kernel/rcu/tree.c
> +++ b/kernel/rcu/tree.c
> @@ -2211,8 +2211,6 @@ static void rcu_cleanup_dead_cpu(int cpu, struct rcu_state *rsp)
>  	/* Adjust any no-longer-needed kthreads. */
>  	rcu_boost_kthread_setaffinity(rnp, -1);
> 
> -	/* Remove the dead CPU from the bitmasks in the rcu_node hierarchy. */
> -
>  	/* Exclude any attempts to start a new grace period. */
>  	mutex_lock(&rsp->onoff_mutex);
>  	raw_spin_lock_irqsave(&rsp->orphan_lock, flags);
> -- 
> 1.9.1
> 
> 


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

end of thread, other threads:[~2014-07-17 23:34 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-15 22:31 [PATCH 1/3] rcu: tiny.c: Update reference to tree.c Pranith Kumar
2014-07-15 22:31 ` [PATCH 2/3] rcu: Remove stale comment in tree.c Pranith Kumar
2014-07-15 22:53   ` josh
2014-07-15 22:57     ` Pranith Kumar
2014-07-16 12:47       ` Paul E. McKenney
2014-07-16 13:29         ` Pranith Kumar
2014-07-16 23:32           ` josh
2014-07-17  0:55           ` Lai Jiangshan
2014-07-17  1:01             ` Pranith Kumar
2014-07-17  1:25               ` Lai Jiangshan
2014-07-17  1:26                 ` Pranith Kumar
2014-07-17  2:14               ` Josh Triplett
2014-07-17  2:20                 ` Pranith Kumar
2014-07-17 23:33                   ` Paul E. McKenney
2014-07-15 22:31 ` [PATCH 3/3] rcu: Use rcu_num_nodes instead of NUM_RCU_NODES Pranith Kumar
2014-07-15 22:54   ` josh
2014-07-16 12:45   ` Paul E. McKenney
2014-07-16 13:26     ` Pranith Kumar
2014-07-15 22:52 ` [PATCH 1/3] rcu: tiny.c: Update reference to tree.c josh

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).