rcu: tiny.c: Update reference to tree.c
PATCH 1/3 rcu: tiny.c: Update reference to tree.c
This commit updates the references to rcutree.c which is now rcu/tree.c
--- kernel/rcu/tiny.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/rcu/tiny.c +2 -2
@@ -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) {
Signature · 1 line
1.9.1
PATCH 2/3 rcu: Remove stale comment in tree.c
This commit removes a stale comment in rcu/tree.c. FYI, an updated comment exists a few lines below this.
--- kernel/rcu/tree.c | 2 -- 1 file changed, 2 deletions(-)
kernel/rcu/tree.c +0 -2
@@ -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);
Signature · 1 line
1.9.1
[email protected]
maintainerRe: [PATCH 2/3] rcu: Remove stale comment in tree.c
Quoted 4 lines · Pranith Kumar
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 <[email protected]>
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
Quoted 19 lines
kernel/rcu/tree.c | 2 -- 1 file changed, 2 deletions(-)kernel/rcu/tree.c +0
-2@@ -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);Signature · 1 line
1.9.1
Re: [PATCH 2/3] rcu: Remove stale comment in tree.c
Quoted 9 lines · On 07/15/2014 06:53 PM, [email protected] wrote:
Quoted 4 lines · Pranith Kumar
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 <[email protected]>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. */
Re: [PATCH 2/3] rcu: Remove stale comment in tree.c
Quoted 12 lines · Pranith Kumar
Quoted 9 lines · On 07/15/2014 06:53 PM, [email protected] wrote:
Quoted 4 lines · Pranith Kumar
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 <[email protected]>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...?
Quoted 5 lines
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
Re: [PATCH 2/3] rcu: Remove stale comment in tree.c
Quoted 17 lines · Paul E. McKenney
Quoted 16 lines · Pranith Kumar
Quoted 9 lines · On 07/15/2014 06:53 PM, [email protected] wrote:
Quoted 4 lines · Pranith Kumar
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 <[email protected]>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 :)
Quoted 8 lines
Quoted 1 line
/* 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 <[email protected]>
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. */
--- kernel/rcu/tree.c | 2 -- 1 file changed, 2 deletions(-)
kernel/rcu/tree.c +0 -2
@@ -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);
Signature · 1 line
1.9.1
Re: [PATCH 2/3] rcu: Remove stale comment in tree.c
Quoted 39 lines · Pranith Kumar
Quoted 17 lines · Paul E. McKenney
Quoted 16 lines · Pranith Kumar
Quoted 9 lines · On 07/15/2014 06:53 PM, [email protected] wrote:
Quoted 4 lines · Pranith Kumar
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 <[email protected]>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 :)
Quoted 8 lines
Quoted 1 line
/* 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.
--
PranithFrom: Pranith Kumar <[email protected]>
Date: Mon, 14 Jul 2014 16:01:05 -0400
Subject: [PATCH 2/3] rcu: Remove stale comment intree.cThis commit removes a stale comment in
rcu/tree.cwhich was left out when some code was moved around previously.
Quoted 6 lines
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_nodehierarchy. */Signed-off-by Pranith Kumar <[email protected]>
Quoted 19 lines
kernel/rcu/tree.c | 2 -- 1 file changed, 2 deletions(-)kernel/rcu/tree.c +0
-2@@ -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);Signature · 1 line
1.9.1
Re: [PATCH 2/3] rcu: Remove stale comment in tree.c
In reply to Pranith KumarQuoted 32 lines · Pranith Kumar
Quoted 17 lines · Paul E. McKenney
Quoted 16 lines · Pranith Kumar
Quoted 9 lines · On 07/15/2014 06:53 PM, [email protected] wrote:
Quoted 4 lines · Pranith Kumar
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 <[email protected]>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 :)
Quoted 8 lines
Quoted 1 line
/* 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
Quoted 6 lines
From: Pranith Kumar <[email protected]>
Date: Mon, 14 Jul 2014 16:01:05 -0400
Subject: [PATCH 2/3] rcu: Remove stale comment intree.cThis commit removes a stale comment in
rcu/tree.cwhich 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...")
Quoted 24 lines
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_nodehierarchy. */Signed-off-by Pranith Kumar <[email protected]>--- kernel/rcu/tree.c | 2 -- 1 file changed, 2 deletions(-)kernel/rcu/tree.c +0
-2@@ -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);
Pranith Kumar
Reviewed-by Joe TripplettRe: [PATCH 2/3] rcu: Remove stale comment in tree.c
Quoted 37 lines · Lai Jiangshan
Quoted 36 lines · Pranith Kumar
Quoted 17 lines · Paul E. McKenney
Quoted 16 lines · Pranith Kumar
Quoted 9 lines · On 07/15/2014 06:53 PM, [email protected] wrote:
Quoted 4 lines · Pranith Kumar
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 <[email protected]>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 :)
Quoted 8 lines
Quoted 1 line
/* 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.
--
PranithFrom: Pranith Kumar <[email protected]>
Date: Mon, 14 Jul 2014 16:01:05 -0400
Subject: [PATCH 2/3] rcu: Remove stale comment intree.c
Quoted 8 lines
Quoted 2 lines
This commit removes a stale comment in
rcu/tree.cwhich 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 <[email protected]>
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. */
--- kernel/rcu/tree.c | 2 -- 1 file changed, 2 deletions(-)
kernel/rcu/tree.c +0 -2
@@ -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);
Signature · 1 line
1.9.1
Lai Jiangshan
Reviewed-byRe: [PATCH 2/3] rcu: Remove stale comment in tree.c
Quoted 49 lines · Pranith Kumar
Quoted 37 lines · Lai Jiangshan
Quoted 36 lines · Pranith Kumar
Quoted 17 lines · Paul E. McKenney
Quoted 16 lines · Pranith Kumar
Quoted 9 lines · On 07/15/2014 06:53 PM, [email protected] wrote:
Quoted 4 lines · Pranith Kumar
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 <[email protected]>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 :)
Quoted 8 lines
Quoted 1 line
/* 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.
--
PranithFrom: Pranith Kumar <[email protected]>
Date: Mon, 14 Jul 2014 16:01:05 -0400
Subject: [PATCH 2/3] rcu: Remove stale comment intree.cQuoted 8 lines
Quoted 2 lines
This commit removes a stale comment in
rcu/tree.cwhich 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:
Quoted 7 lines
From: Pranith Kumar <[email protected]>
Date: Mon, 14 Jul 2014 16:01:05 -0400
Subject: [PATCH 2/3] rcu: Remove stale comment intree.cThis commit removes a stale comment in
rcu/tree.cwhich was left out in commit2036d94a7b61ca5032ce(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")
Quoted 8 lines
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_nodehierarchy. */Signed-off-by Pranith Kumar <[email protected]>Reviewed-by Joe Tripplett <[email protected]>
Quoted 17 lines
--- kernel/rcu/tree.c | 2 -- 1 file changed, 2 deletions(-)kernel/rcu/tree.c +0
-2@@ -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);
Re: [PATCH 2/3] rcu: Remove stale comment in tree.c
Quoted 55 lines · Lai Jiangshan
Quoted 54 lines · Pranith Kumar
Quoted 37 lines · Lai Jiangshan
Quoted 36 lines · Pranith Kumar
Quoted 17 lines · Paul E. McKenney
Quoted 16 lines · Pranith Kumar
Quoted 9 lines · On 07/15/2014 06:53 PM, [email protected] wrote:
Quoted 4 lines · Pranith Kumar
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 <[email protected]>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 :)
Quoted 8 lines
Quoted 1 line
/* 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.
--
PranithFrom: Pranith Kumar <[email protected]>
Date: Mon, 14 Jul 2014 16:01:05 -0400
Subject: [PATCH 2/3] rcu: Remove stale comment intree.cQuoted 8 lines
Quoted 2 lines
This commit removes a stale comment in
rcu/tree.cwhich 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 <[email protected]>
Date: Mon, 14 Jul 2014 16:01:05 -0400
Subject: [PATCH 2/3] rcu: Remove stale comment intree.c
Quoted 7 lines
Quoted 2 lines
This commit removes a stale comment in
rcu/tree.cwhich was left out in commit2036d94a7b61ca5032ce(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
Quoted 29 lines
Quoted 8 lines
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_nodehierarchy. */Signed-off-by Pranith Kumar <[email protected]>Reviewed-by Joe Tripplett <[email protected]>Reviewed-by Lai Jiangshan <[email protected]>Quoted 17 lines
--- kernel/rcu/tree.c | 2 -- 1 file changed, 2 deletions(-)kernel/rcu/tree.c +0
-2@@ -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);
Josh Triplett
maintainerRe: [PATCH 2/3] rcu: Remove stale comment in tree.c
In reply to Pranith KumarQuoted 1 line · Pranith Kumar
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. ;)
Quoted 35 lines
From: Pranith Kumar <[email protected]>
Date: Mon, 14 Jul 2014 16:01:05 -0400
Subject: [PATCH 2/3] rcu: Remove stale comment intree.cThis commit removes a stale comment in
rcu/tree.cwhich was left out in commit2036d94a7b61ca5032ce(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_nodehierarchy. */Signed-off-by Pranith Kumar <[email protected]>Reviewed-by Joe Tripplett <[email protected]>--- kernel/rcu/tree.c | 2 -- 1 file changed, 2 deletions(-)kernel/rcu/tree.c +0
-2@@ -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);Signature · 1 line
1.9.1
Re: [PATCH 2/3] rcu: Remove stale comment in tree.c
Quoted 6 lines · Josh Triplett
Quoted 1 line · Pranith Kumar
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 <[email protected]>
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. */
--- kernel/rcu/tree.c | 2 -- 1 file changed, 2 deletions(-)
kernel/rcu/tree.c +0 -2
@@ -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);
Signature · 1 line
1.9.1
Paul E. McKenney
AppliedRe: [PATCH 2/3] rcu: Remove stale comment in tree.c
Quoted 22 lines · Pranith Kumar
Quoted 6 lines · Josh Triplett
Quoted 1 line · Pranith Kumar
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 <[email protected]>
Date: Mon, 14 Jul 2014 16:01:05 -0400
Subject: [PATCH 2/3] rcu: Remove stale comment intree.cThis commit removes a stale comment in
rcu/tree.cwhich was left out when some code was moved around previously in the commit
2036d94a7b61("rcu: Rework detection of use of RCU by offline CPUs")
Quoted 8 lines
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_nodehierarchy. */Signed-off-by Pranith Kumar <[email protected]>Reviewed-by Josh Triplett <[email protected]>Reviewed-by Lai Jiangshan <[email protected]>
Queued for 3.18, thank you all!
Thanx, Paul
Quoted 21 lines
--- kernel/rcu/tree.c | 2 -- 1 file changed, 2 deletions(-)kernel/rcu/tree.c +0
-2@@ -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);Signature · 1 line
1.9.1
PATCH 3/3 rcu: Use rcu_num_nodes instead of NUM_RCU_NODES
In reply to Pranith KumarNUM_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.
--- kernel/rcu/tree_plugin.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
kernel/rcu/tree_plugin.h +4 -2
@@ -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); }
Signature · 1 line
1.9.1
Re: [PATCH 3/3] rcu: Use rcu_num_nodes instead of NUM_RCU_NODES
Quoted 8 lines · Pranith Kumar
NUM_RCU_NODESis set at build time and is usually a huge number. We calculate the actual number of rcu nodes necessary at boot time based onnr_cpu_idsinrcu_init_geometry()and store it inrcu_num_nodes. We should use this variable instead ofNUM_RCU_NODES.This commit changes all such uses of
NUM_RCU_NODEStorcu_num_nodes.Signed-off-by Pranith Kumar <[email protected]>
(On a separate note, these names really need to provide clearer explanations of the difference, grumble. Case and word order explains little.)
Quoted 37 lines
kernel/rcu/tree_plugin.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)kernel/rcu/tree_plugin.h +4
-2@@ -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); }Signature · 1 line
1.9.1
Re: [PATCH 3/3] rcu: Use rcu_num_nodes instead of NUM_RCU_NODES
In reply to Pranith KumarQuoted 17 lines · Pranith Kumar
NUM_RCU_NODESis set at build time and is usually a huge number. We calculate the actual number of rcu nodes necessary at boot time based onnr_cpu_idsinrcu_init_geometry()and store it inrcu_num_nodes. We should use this variable instead ofNUM_RCU_NODES.This commit changes all such uses of
NUM_RCU_NODEStorcu_num_nodes.Signed-off-by Pranith Kumar <[email protected]>--- kernel/rcu/tree_plugin.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)kernel/rcu/tree_plugin.h +0
-0
kernel/rcu/tree_plugin.h static bool __read_mostly rcu_nocb_poll; /* Offload kthread are to poll. */ · line 49
Quoted 4 lines
kernel/rcu/tree_plugin.h +1
-0@@ -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.
Quoted 14 lines
kernel/rcu/tree_plugin.h +2
-1+/* * 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 ();
kernel/rcu/tree_plugin.h static void __init rcu_spawn_boost_kthreads(void) · line 1483
Quoted 8 lines
kernel/rcu/tree_plugin.h +1
-1@@ -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
Re: [PATCH 3/3] rcu: Use rcu_num_nodes instead of NUM_RCU_NODES
Quoted 26 lines · Paul E. McKenney
Quoted 17 lines · Pranith Kumar
NUM_RCU_NODESis set at build time and is usually a huge number. We calculate the actual number of rcu nodes necessary at boot time based onnr_cpu_idsinrcu_init_geometry()and store it inrcu_num_nodes. We should use this variable instead ofNUM_RCU_NODES.This commit changes all such uses of
NUM_RCU_NODEStorcu_num_nodes.Signed-off-by Pranith Kumar <[email protected]>--- kernel/rcu/tree_plugin.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)kernel/rcu/tree_plugin.h +0
-0kernel/rcu/tree_plugin.h static bool __read_mostly rcu_nocb_poll; /* Offload kthread are to poll. */ · line 49
Quoted 4 lines
kernel/rcu/tree_plugin.h +1
-0@@ -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.cway before the #include ofkernel/rcu/tree_plugin.h.
Quoted 5 lines
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 <[email protected]>
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.
--- kernel/rcu/tree_plugin.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/rcu/tree_plugin.h +2 -2
@@ -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); }
Signature · 1 line
1.9.1
Quoted 3 lines · Pranith Kumar
This commit updates the references to
rcutree.cwhich is nowrcu/tree.cSigned-off-by Pranith Kumar <[email protected]>
Quoted 28 lines
kernel/rcu/tiny.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)kernel/rcu/tiny.c +2
-2@@ -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) {Signature · 1 line
1.9.1