Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1354928 > unrolled thread
| Started by | Peter Zijlstra <peterz@infradead.org> |
|---|---|
| First post | 2016-03-10 09:50 +0100 |
| Last post | 2016-03-10 15:00 +0100 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] rcu: Remove some superfluous lines Peter Zijlstra <peterz@infradead.org> - 2016-03-10 09:50 +0100
Re: [PATCH] rcu: Remove some superfluous lines "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-03-10 14:50 +0100
Re: [PATCH] rcu: Remove some superfluous lines Peter Zijlstra <peterz@infradead.org> - 2016-03-10 15:00 +0100
| From | Peter Zijlstra <peterz@infradead.org> |
|---|---|
| Date | 2016-03-10 09:50 +0100 |
| Subject | [PATCH] rcu: Remove some superfluous lines |
| Message-ID | <rb4sa-4iX-13@gated-at.bofh.it> |
I think you'll find this condition is superfluous, as the whole function is under #ifdef of that same. Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> --- kernel/rcu/tree.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index 4f7369d54de0..dd2646e56456 100644 --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c @@ -4237,9 +4237,6 @@ static void rcu_cleanup_dying_idle_cpu(int cpu, struct rcu_state *rsp) struct rcu_data *rdp = per_cpu_ptr(rsp->rda, cpu); struct rcu_node *rnp = rdp->mynode; /* Outgoing CPU's rdp & rnp. */ - if (!IS_ENABLED(CONFIG_HOTPLUG_CPU)) - return; - /* Remove outgoing CPU from mask in the leaf rcu_node structure. */ mask = rdp->grpmask; raw_spin_lock_irqsave_rcu_node(rnp, flags); /* Enforce GP memory-order guarantee. */
[toc] | [next] | [standalone]
| From | "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> |
|---|---|
| Date | 2016-03-10 14:50 +0100 |
| Message-ID | <rb98t-7FW-5@gated-at.bofh.it> |
| In reply to | #1354928 |
On Thu, Mar 10, 2016 at 09:49:04AM +0100, Peter Zijlstra wrote: > > I think you'll find this condition is superfluous, as the whole function > is under #ifdef of that same. > > Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Right you are! It got moved under that #ifdef in the process of merging the RCU, hotplug, and swait changes, and I failed to notice. Good catch! I will apply this to my tree once -rc1 comes out, as it will apply to -rcu at that point. Or maybe we should remove the #ifdef and add IS_ENABLED() to the other functions under that #ifdef. Thoughts? Thanx, Paul > --- > kernel/rcu/tree.c | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c > index 4f7369d54de0..dd2646e56456 100644 > --- a/kernel/rcu/tree.c > +++ b/kernel/rcu/tree.c > @@ -4237,9 +4237,6 @@ static void rcu_cleanup_dying_idle_cpu(int cpu, struct rcu_state *rsp) > struct rcu_data *rdp = per_cpu_ptr(rsp->rda, cpu); > struct rcu_node *rnp = rdp->mynode; /* Outgoing CPU's rdp & rnp. */ > > - if (!IS_ENABLED(CONFIG_HOTPLUG_CPU)) > - return; > - > /* Remove outgoing CPU from mask in the leaf rcu_node structure. */ > mask = rdp->grpmask; > raw_spin_lock_irqsave_rcu_node(rnp, flags); /* Enforce GP memory-order guarantee. */ >
[toc] | [prev] | [next] | [standalone]
| From | Peter Zijlstra <peterz@infradead.org> |
|---|---|
| Date | 2016-03-10 15:00 +0100 |
| Message-ID | <rb9i9-7Ja-9@gated-at.bofh.it> |
| In reply to | #1355128 |
On Thu, Mar 10, 2016 at 05:41:46AM -0800, Paul E. McKenney wrote: > On Thu, Mar 10, 2016 at 09:49:04AM +0100, Peter Zijlstra wrote: > > > > I think you'll find this condition is superfluous, as the whole function > > is under #ifdef of that same. > > > > Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> > > Right you are! It got moved under that #ifdef in the process of merging > the RCU, hotplug, and swait changes, and I failed to notice. Good catch! > > I will apply this to my tree once -rc1 comes out, as it will apply to > -rcu at that point. > > Or maybe we should remove the #ifdef and add IS_ENABLED() to the other > functions under that #ifdef. Thoughts? I'd go with the #ifdef, its the conventional pattern.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web