Re: [PATCH 01/10] cpumask: Introduce cpumask_any_online_but

2015-06-24 Thread Vikas Shivappa
On Wed, 24 Jun 2015, Thomas Gleixner wrote: On Tue, 23 Jun 2015, Vikas Shivappa wrote: There is currently no cpumask helper function to pick a "random" cpu from a mask which is also online. cpumask_any_online_but() does that which is similar to cpumask_any_but() but also returns a cpu that

Re: [PATCH 01/10] cpumask: Introduce cpumask_any_online_but

2015-06-24 Thread Thomas Gleixner
On Tue, 23 Jun 2015, Vikas Shivappa wrote: > There is currently no cpumask helper function to pick a "random" cpu > from a mask which is also online. > > cpumask_any_online_but() does that which is similar to cpumask_any_but() > but also returns a cpu that is online. > > Signed-off-by: Vikas

Re: [PATCH 01/10] cpumask: Introduce cpumask_any_online_but

2015-06-24 Thread Thomas Gleixner
On Tue, 23 Jun 2015, Vikas Shivappa wrote: There is currently no cpumask helper function to pick a random cpu from a mask which is also online. cpumask_any_online_but() does that which is similar to cpumask_any_but() but also returns a cpu that is online. Signed-off-by: Vikas Shivappa

Re: [PATCH 01/10] cpumask: Introduce cpumask_any_online_but

2015-06-24 Thread Vikas Shivappa
On Wed, 24 Jun 2015, Thomas Gleixner wrote: On Tue, 23 Jun 2015, Vikas Shivappa wrote: There is currently no cpumask helper function to pick a random cpu from a mask which is also online. cpumask_any_online_but() does that which is similar to cpumask_any_but() but also returns a cpu that is

[PATCH 01/10] cpumask: Introduce cpumask_any_online_but

2015-06-23 Thread Vikas Shivappa
There is currently no cpumask helper function to pick a "random" cpu from a mask which is also online. cpumask_any_online_but() does that which is similar to cpumask_any_but() but also returns a cpu that is online. Signed-off-by: Vikas Shivappa --- include/linux/cpumask.h | 18

[PATCH 01/10] cpumask: Introduce cpumask_any_online_but

2015-06-23 Thread Vikas Shivappa
There is currently no cpumask helper function to pick a random cpu from a mask which is also online. cpumask_any_online_but() does that which is similar to cpumask_any_but() but also returns a cpu that is online. Signed-off-by: Vikas Shivappa vikas.shiva...@linux.intel.com ---

Re: [PATCH 01/10] cpumask: Introduce cpumask_any_online_but

2015-06-16 Thread Vikas Shivappa
On Tue, 16 Jun 2015, Thomas Gleixner wrote: On Mon, 15 Jun 2015, Vikas Shivappa wrote: On Mon, 15 Jun 2015, Peter Zijlstra wrote: On Fri, Jun 12, 2015 at 11:17:08AM -0700, Vikas Shivappa wrote: + cpumask_and(, cpu_online_mask, mask); + cpumask_clear_cpu(cpu, ); + return

Re: [PATCH 01/10] cpumask: Introduce cpumask_any_online_but

2015-06-16 Thread Thomas Gleixner
On Mon, 15 Jun 2015, Vikas Shivappa wrote: > On Mon, 15 Jun 2015, Peter Zijlstra wrote: > > On Fri, Jun 12, 2015 at 11:17:08AM -0700, Vikas Shivappa wrote: > > > + cpumask_and(, cpu_online_mask, mask); > > > + cpumask_clear_cpu(cpu, ); > > > + return cpumask_any(); > > > +} > > > > You had a good

Re: [PATCH 01/10] cpumask: Introduce cpumask_any_online_but

2015-06-16 Thread Vikas Shivappa
On Tue, 16 Jun 2015, Thomas Gleixner wrote: On Mon, 15 Jun 2015, Vikas Shivappa wrote: On Mon, 15 Jun 2015, Peter Zijlstra wrote: On Fri, Jun 12, 2015 at 11:17:08AM -0700, Vikas Shivappa wrote: + cpumask_and(tmp, cpu_online_mask, mask); + cpumask_clear_cpu(cpu, tmp); +

Re: [PATCH 01/10] cpumask: Introduce cpumask_any_online_but

2015-06-16 Thread Thomas Gleixner
On Mon, 15 Jun 2015, Vikas Shivappa wrote: On Mon, 15 Jun 2015, Peter Zijlstra wrote: On Fri, Jun 12, 2015 at 11:17:08AM -0700, Vikas Shivappa wrote: + cpumask_and(tmp, cpu_online_mask, mask); + cpumask_clear_cpu(cpu, tmp); + return cpumask_any(tmp); +} You had a good example

Re: [PATCH 01/10] cpumask: Introduce cpumask_any_online_but

2015-06-15 Thread Vikas Shivappa
On Mon, 15 Jun 2015, Peter Zijlstra wrote: On Fri, Jun 12, 2015 at 11:17:08AM -0700, Vikas Shivappa wrote: There is currently no cpumask helper function to pick a "random" cpu from a mask which is also online. cpumask_any_online_but() does that which is similar to cpumask_any_but() but also

Re: [PATCH 01/10] cpumask: Introduce cpumask_any_online_but

2015-06-15 Thread Peter Zijlstra
On Fri, Jun 12, 2015 at 11:17:08AM -0700, Vikas Shivappa wrote: > There is currently no cpumask helper function to pick a "random" cpu > from a mask which is also online. > > cpumask_any_online_but() does that which is similar to cpumask_any_but() > but also returns a cpu that is online. > >

Re: [PATCH 01/10] cpumask: Introduce cpumask_any_online_but

2015-06-15 Thread Peter Zijlstra
On Fri, Jun 12, 2015 at 11:17:08AM -0700, Vikas Shivappa wrote: There is currently no cpumask helper function to pick a random cpu from a mask which is also online. cpumask_any_online_but() does that which is similar to cpumask_any_but() but also returns a cpu that is online.

Re: [PATCH 01/10] cpumask: Introduce cpumask_any_online_but

2015-06-15 Thread Vikas Shivappa
On Mon, 15 Jun 2015, Peter Zijlstra wrote: On Fri, Jun 12, 2015 at 11:17:08AM -0700, Vikas Shivappa wrote: There is currently no cpumask helper function to pick a random cpu from a mask which is also online. cpumask_any_online_but() does that which is similar to cpumask_any_but() but also

[PATCH 01/10] cpumask: Introduce cpumask_any_online_but

2015-06-12 Thread Vikas Shivappa
There is currently no cpumask helper function to pick a "random" cpu from a mask which is also online. cpumask_any_online_but() does that which is similar to cpumask_any_but() but also returns a cpu that is online. Signed-off-by: Vikas Shivappa --- include/linux/cpumask.h | 18

[PATCH 01/10] cpumask: Introduce cpumask_any_online_but

2015-06-12 Thread Vikas Shivappa
There is currently no cpumask helper function to pick a random cpu from a mask which is also online. cpumask_any_online_but() does that which is similar to cpumask_any_but() but also returns a cpu that is online. Signed-off-by: Vikas Shivappa vikas.shiva...@linux.intel.com ---

[PATCH 01/10] cpumask: Introduce cpumask_any_online_but

2015-06-04 Thread Vikas Shivappa
There is currently no cpumask helper function to pick a "random" cpu from a mask which is also online. cpumask_any_online_but() does that which is similar to cpumask_any_but() but also returns a cpu that is online. Signed-off-by: Vikas Shivappa --- include/linux/cpumask.h | 18

[PATCH 01/10] cpumask: Introduce cpumask_any_online_but

2015-06-04 Thread Vikas Shivappa
There is currently no cpumask helper function to pick a random cpu from a mask which is also online. cpumask_any_online_but() does that which is similar to cpumask_any_but() but also returns a cpu that is online. Signed-off-by: Vikas Shivappa vikas.shiva...@linux.intel.com ---

[PATCH 01/10] cpumask: Introduce cpumask_any_online_but

2015-06-03 Thread Vikas Shivappa
There is currently no cpumask helper function to pick a "random" cpu from a mask which is also online. cpumask_any_online_but() does that which is similar to cpumask_any_but() but also returns a cpu that is online. Signed-off-by: Vikas Shivappa --- include/linux/cpumask.h | 18

[PATCH 01/10] cpumask: Introduce cpumask_any_online_but

2015-06-03 Thread Vikas Shivappa
There is currently no cpumask helper function to pick a random cpu from a mask which is also online. cpumask_any_online_but() does that which is similar to cpumask_any_but() but also returns a cpu that is online. Signed-off-by: Vikas Shivappa vikas.shiva...@linux.intel.com ---