Re: [RFC PATCH powerpc] Set cpu sibling mask before online cpu

2013-06-13 Thread Li Zhong
On Tue, 2013-06-11 at 14:03 +0530, Srivatsa S. Bhat wrote: > On 06/11/2013 12:30 PM, Benjamin Herrenschmidt wrote: > > On Thu, 2013-05-16 at 18:20 +0800, Li Zhong wrote: > >> It seems following race is possible: > >> > > > > .../... > > > >>vdso_getcpu_init(); > >> #endif > >> - notify_cpu

Re: [RFC PATCH powerpc] Set cpu sibling mask before online cpu

2013-06-11 Thread Benjamin Herrenschmidt
On Tue, 2013-06-11 at 14:03 +0530, Srivatsa S. Bhat wrote: > > So I agree with Li Zhong's solution. > > [Arch-specific CPU hotplug code consolidation efforts such as [1] would > have weeded out such nasty bugs.. I guess we should revive that patchset > sometime soon.] Thanks ! Cheers, Ben. __

Re: [RFC PATCH powerpc] Set cpu sibling mask before online cpu

2013-06-11 Thread Srivatsa S. Bhat
On 05/16/2013 03:50 PM, Li Zhong wrote: > It seems following race is possible: > > cpu0cpux > smp_init->cpu_up->_cpu_up > __cpu_up > kick_cpu(1) > - >

Re: [RFC PATCH powerpc] Set cpu sibling mask before online cpu

2013-06-11 Thread Srivatsa S. Bhat
On 06/11/2013 12:30 PM, Benjamin Herrenschmidt wrote: > On Thu, 2013-05-16 at 18:20 +0800, Li Zhong wrote: >> It seems following race is possible: >> > > .../... > >> vdso_getcpu_init(); >> #endif >> -notify_cpu_starting(cpu); >> -set_cpu_online(cpu, true); >> /* Update siblin

Re: [RFC PATCH powerpc] Set cpu sibling mask before online cpu

2013-06-11 Thread Benjamin Herrenschmidt
On Thu, 2013-05-16 at 18:20 +0800, Li Zhong wrote: > It seems following race is possible: > .../... > vdso_getcpu_init(); > #endif > - notify_cpu_starting(cpu); > - set_cpu_online(cpu, true); > /* Update sibling maps */ > base = cpu_first_thread_sibling(cpu); >

[RFC PATCH powerpc] Set cpu sibling mask before online cpu

2013-05-16 Thread Li Zhong
It seems following race is possible: cpu0cpux smp_init->cpu_up->_cpu_up __cpu_up kick_cpu(1) - waiting online ...