diff options
author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2014-11-10 11:07:08 -0500 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2015-01-06 14:02:50 -0500 |
commit | 5d0b024973027556b48a09bb36b55dc853ec7c6e (patch) | |
tree | 57764b5b8758710b2f788fbadc798b89d716ea03 /kernel/rcu | |
parent | 1be0085b515e786e962b9f2d03616209eb6eb9a7 (diff) |
rcu: Don't bother affinitying rcub kthreads away from offline CPUs
When rcu_boost_kthread_setaffinity() sees that all CPUs for a given
rcu_node structure are now offline, it affinities the corresponding
RCU-boost ("rcub") kthread away from those CPUs. This is pointless
because the kthread cannot run on those offline CPUs in any case.
This commit therefore removes this unneeded code.
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'kernel/rcu')
-rw-r--r-- | kernel/rcu/tree_plugin.h | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h index 3e64bb197b1a..1fac68220999 100644 --- a/kernel/rcu/tree_plugin.h +++ b/kernel/rcu/tree_plugin.h | |||
@@ -1322,12 +1322,8 @@ static void rcu_boost_kthread_setaffinity(struct rcu_node *rnp, int outgoingcpu) | |||
1322 | for (cpu = rnp->grplo; cpu <= rnp->grphi; cpu++, mask >>= 1) | 1322 | for (cpu = rnp->grplo; cpu <= rnp->grphi; cpu++, mask >>= 1) |
1323 | if ((mask & 0x1) && cpu != outgoingcpu) | 1323 | if ((mask & 0x1) && cpu != outgoingcpu) |
1324 | cpumask_set_cpu(cpu, cm); | 1324 | cpumask_set_cpu(cpu, cm); |
1325 | if (cpumask_weight(cm) == 0) { | 1325 | if (cpumask_weight(cm) == 0) |
1326 | cpumask_setall(cm); | 1326 | cpumask_setall(cm); |
1327 | for (cpu = rnp->grplo; cpu <= rnp->grphi; cpu++) | ||
1328 | cpumask_clear_cpu(cpu, cm); | ||
1329 | WARN_ON_ONCE(cpumask_weight(cm) == 0); | ||
1330 | } | ||
1331 | set_cpus_allowed_ptr(t, cm); | 1327 | set_cpus_allowed_ptr(t, cm); |
1332 | free_cpumask_var(cm); | 1328 | free_cpumask_var(cm); |
1333 | } | 1329 | } |