Re: [PATCH v3 10/45] smp: Use get/put_online_cpus_atomic() to prevent CPU offline

2013-07-02 Thread Michael Wang
On 07/02/2013 05:51 PM, Srivatsa S. Bhat wrote: [snip] > > Well, as I said, its timing dependent. We might miss the newly onlined CPU in > the for_each_online_cpu() loop itself, based on when exactly the CPU was added > to the cpu_online_mask. So you can't exactly pin-point the places where you'll

Re: [PATCH v3 10/45] smp: Use get/put_online_cpus_atomic() to prevent CPU offline

2013-07-02 Thread Srivatsa S. Bhat
On 07/02/2013 02:17 PM, Michael Wang wrote: > On 07/02/2013 04:25 PM, Srivatsa S. Bhat wrote: >> Hi Michael, >> >> On 07/02/2013 11:02 AM, Michael Wang wrote: >>> Hi, Srivatsa >>> >>> On 06/28/2013 03:54 AM, Srivatsa S. Bhat wrote: >>> [snip] @@ -625,8 +632,9 @@ EXPORT_SYMBOL(on_each_cpu_mask)

Re: [PATCH v3 10/45] smp: Use get/put_online_cpus_atomic() to prevent CPU offline

2013-07-02 Thread Michael Wang
On 07/02/2013 04:25 PM, Srivatsa S. Bhat wrote: > Hi Michael, > > On 07/02/2013 11:02 AM, Michael Wang wrote: >> Hi, Srivatsa >> >> On 06/28/2013 03:54 AM, Srivatsa S. Bhat wrote: >> [snip] >>> @@ -625,8 +632,9 @@ EXPORT_SYMBOL(on_each_cpu_mask); >>> * The function might sleep if the GFP flags i

Re: [PATCH v3 10/45] smp: Use get/put_online_cpus_atomic() to prevent CPU offline

2013-07-02 Thread Srivatsa S. Bhat
Hi Michael, On 07/02/2013 11:02 AM, Michael Wang wrote: > Hi, Srivatsa > > On 06/28/2013 03:54 AM, Srivatsa S. Bhat wrote: > [snip] >> @@ -625,8 +632,9 @@ EXPORT_SYMBOL(on_each_cpu_mask); >> * The function might sleep if the GFP flags indicates a non >> * atomic allocation is allowed. >> *

Re: [PATCH v3 10/45] smp: Use get/put_online_cpus_atomic() to prevent CPU offline

2013-07-01 Thread Michael Wang
Hi, Srivatsa On 06/28/2013 03:54 AM, Srivatsa S. Bhat wrote: [snip] > @@ -625,8 +632,9 @@ EXPORT_SYMBOL(on_each_cpu_mask); > * The function might sleep if the GFP flags indicates a non > * atomic allocation is allowed. > * > - * Preemption is disabled to protect against CPUs going offline bu

[PATCH v3 10/45] smp: Use get/put_online_cpus_atomic() to prevent CPU offline

2013-06-27 Thread Srivatsa S. Bhat
Once stop_machine() is gone from the CPU offline path, we won't be able to depend on disabling preemption to prevent CPUs from going offline from under us. Use the get/put_online_cpus_atomic() APIs to prevent CPUs from going offline, while invoking from atomic context. Cc: Andrew Morton Cc: Wang