Re: [PATCH] rcu: tree: correctly handle sparse possible CPUs

2016-05-18 Thread Paul E. McKenney
On Wed, May 18, 2016 at 07:30:41PM +0100, Mark Rutland wrote: > On Wed, May 18, 2016 at 11:01:53AM -0700, Paul E. McKenney wrote: > > On Wed, May 18, 2016 at 06:15:23PM +0300, Andrey Ryabinin wrote: > > > 2016-05-16 19:48 GMT+03:00 Mark Rutland : > > > > > > > /* > > > > + * Iterate over all poss

Re: [PATCH] rcu: tree: correctly handle sparse possible CPUs

2016-05-18 Thread Mark Rutland
On Wed, May 18, 2016 at 11:01:53AM -0700, Paul E. McKenney wrote: > On Wed, May 18, 2016 at 06:15:23PM +0300, Andrey Ryabinin wrote: > > 2016-05-16 19:48 GMT+03:00 Mark Rutland : > > > > > /* > > > + * Iterate over all possible CPUs in a leaf RCU node. > > > + */ > > > +#define for_each_leaf_node

Re: [PATCH] rcu: tree: correctly handle sparse possible CPUs

2016-05-18 Thread Paul E. McKenney
On Wed, May 18, 2016 at 06:15:23PM +0300, Andrey Ryabinin wrote: > 2016-05-16 19:48 GMT+03:00 Mark Rutland : > > > /* > > + * Iterate over all possible CPUs in a leaf RCU node. > > + */ > > +#define for_each_leaf_node_possible_cpu(rnp, cpu) \ > > + for ((cpu) = rnp->grplo; \ > > +

Re: [PATCH] rcu: tree: correctly handle sparse possible CPUs

2016-05-18 Thread Andrey Ryabinin
2016-05-16 19:48 GMT+03:00 Mark Rutland : > /* > + * Iterate over all possible CPUs in a leaf RCU node. > + */ > +#define for_each_leaf_node_possible_cpu(rnp, cpu) \ > + for ((cpu) = rnp->grplo; \ > +cpu <= rnp->grphi; \ > +cpu = cpumask_next((cpu), cpu_possible_mask

Re: [PATCH] rcu: tree: correctly handle sparse possible CPUs

2016-05-16 Thread Paul E. McKenney
On Mon, May 16, 2016 at 05:48:26PM +0100, Mark Rutland wrote: > In many cases in the RCU tree code, we iterate over the set of CPUS for > a leaf node described by rcu_node::grplo and rcu_node::grphi, checking > per-cpu data for each CPU in this range. However, if the set of possible > CPUs is spars