Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1539204
| From | Boqun Feng <boqun.feng@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [RFC 5/5] rcu: Use leaf_node_for_each_mask_*() for leaf node online CPU iteration |
| Date | 2016-12-09 10:00 +0100 |
| Message-ID | <sMpc6-16k-23@gated-at.bofh.it> (permalink) |
| References | <sMp2p-12O-13@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Though mostly identical, ->qsmaskinit(A.K.A rcu_rnp_online_cpus) is sometimes more sparse than the corresponding part of cpu_possible_mask for an RCU leaf node. So we use leaf_node_for_each_mask_possible_cpu() in rcu_boost_kthread_setaffinity() instead to save some extra checks. Signed-off-by: Boqun Feng <boqun.feng@gmail.com> --- kernel/rcu/tree_plugin.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h index 69c6eb27c37f..c954c2a7a9ba 100644 --- a/kernel/rcu/tree_plugin.h +++ b/kernel/rcu/tree_plugin.h @@ -1170,15 +1170,17 @@ static void rcu_boost_kthread_setaffinity(struct rcu_node *rnp, int outgoingcpu) unsigned long mask = rcu_rnp_online_cpus(rnp); cpumask_var_t cm; int cpu; + unsigned long bit; if (!t) return; if (!zalloc_cpumask_var(&cm, GFP_KERNEL)) return; - for_each_leaf_node_possible_cpu(rnp, cpu) - if ((mask & leaf_node_cpu_bit(rnp, cpu)) && - cpu != outgoingcpu) + + leaf_node_for_each_mask_possible_cpu(rnp, mask, bit, cpu) + if (cpu != outgoingcpu) cpumask_set_cpu(cpu, cm); + if (cpumask_weight(cm) == 0) cpumask_setall(cm); set_cpus_allowed_ptr(t, cm); -- 2.10.2
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[RFC 0/5] rcu: Introduce leaf_node_for_each_mask_possible_cpu() and its friend Boqun Feng <boqun.feng@gmail.com> - 2016-12-09 09:50 +0100
[RFC 5/5] rcu: Use leaf_node_for_each_mask_*() for leaf node online CPU iteration Boqun Feng <boqun.feng@gmail.com> - 2016-12-09 10:00 +0100
Re: [RFC 0/5] rcu: Introduce leaf_node_for_each_mask_possible_cpu() and its friend "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-12-10 00:50 +0100
Re: [RFC 0/5] rcu: Introduce leaf_node_for_each_mask_possible_cpu() and its friend Boqun Feng <boqun.feng@gmail.com> - 2016-12-10 01:50 +0100
Re: [RFC 0/5] rcu: Introduce leaf_node_for_each_mask_possible_cpu() and its friend "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-12-10 05:30 +0100
Re: [RFC 0/5] rcu: Introduce leaf_node_for_each_mask_possible_cpu() and its friend Boqun Feng <boqun.feng@gmail.com> - 2016-12-10 14:40 +0100
Re: [RFC 0/5] rcu: Introduce leaf_node_for_each_mask_possible_cpu() and its friend "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-12-10 18:40 +0100
Re: [RFC 0/5] rcu: Introduce leaf_node_for_each_mask_possible_cpu() and its friend Boqun Feng <boqun.feng@gmail.com> - 2016-12-11 01:10 +0100
csiph-web