Re: [PATCH v3 1/5] x86: initialize secondary CPU only if master CPU will wait for it

2014-04-14 Thread Igor Mammedov
On Mon, 14 Apr 2014 16:51:19 +0200 Ingo Molnar wrote: > > * Igor Mammedov wrote: > > > On Mon, 14 Apr 2014 12:03:35 +0200 > > Ingo Molnar wrote: > > > > > > > > * Igor Mammedov wrote: > > > > > > > On Mon, 14 Apr 2014 11:16:00 +0200 > > > > Ingo Molnar wrote: > > > > > > > > > > > > >

Re: [PATCH v3 1/5] x86: initialize secondary CPU only if master CPU will wait for it

2014-04-14 Thread Ingo Molnar
* Igor Mammedov wrote: > On Mon, 14 Apr 2014 12:03:35 +0200 > Ingo Molnar wrote: > > > > > * Igor Mammedov wrote: > > > > > On Mon, 14 Apr 2014 11:16:00 +0200 > > > Ingo Molnar wrote: > > > > > > > > > > > * Igor Mammedov wrote: > > > > > > > > > /* > > > > > + * wait for AC

Re: [PATCH v3 1/5] x86: initialize secondary CPU only if master CPU will wait for it

2014-04-14 Thread Igor Mammedov
On Mon, 14 Apr 2014 12:03:35 +0200 Ingo Molnar wrote: > > * Igor Mammedov wrote: > > > On Mon, 14 Apr 2014 11:16:00 +0200 > > Ingo Molnar wrote: > > > > > > > > * Igor Mammedov wrote: > > > > > > > /* > > > > +* wait for ACK from master CPU before continuing > > > > +

Re: [PATCH v3 1/5] x86: initialize secondary CPU only if master CPU will wait for it

2014-04-14 Thread Igor Mammedov
On Mon, 14 Apr 2014 12:03:35 +0200 Ingo Molnar wrote: > > * Igor Mammedov wrote: > > > On Mon, 14 Apr 2014 11:16:00 +0200 > > Ingo Molnar wrote: > > > > > > > > * Igor Mammedov wrote: > > > > > > > /* > > > > +* wait for ACK from master CPU before continuing > > > > +

Re: [PATCH v3 1/5] x86: initialize secondary CPU only if master CPU will wait for it

2014-04-14 Thread Ingo Molnar
* Igor Mammedov wrote: > On Mon, 14 Apr 2014 11:16:00 +0200 > Ingo Molnar wrote: > > > > > * Igor Mammedov wrote: > > > > > /* > > > + * wait for ACK from master CPU before continuing > > > + * with AP initialization > > > + */ > > > + cpumask_set_cpu(cpu, cpu_initialized_mask); > > >

Re: [PATCH v3 1/5] x86: initialize secondary CPU only if master CPU will wait for it

2014-04-14 Thread Igor Mammedov
On Mon, 14 Apr 2014 11:16:00 +0200 Ingo Molnar wrote: > > * Igor Mammedov wrote: > > > /* > > +* wait for ACK from master CPU before continuing > > +* with AP initialization > > +*/ > > + cpumask_set_cpu(cpu, cpu_initialized_mask); > > + while (!cpumask_test_cpu(cpu, cpu_ca

Re: [PATCH v3 1/5] x86: initialize secondary CPU only if master CPU will wait for it

2014-04-14 Thread Ingo Molnar
* Igor Mammedov wrote: > /* > + * wait for ACK from master CPU before continuing > + * with AP initialization > + */ > + cpumask_set_cpu(cpu, cpu_initialized_mask); > + while (!cpumask_test_cpu(cpu, cpu_callout_mask)) > + cpu_relax(); > + /* > +

[PATCH v3 1/5] x86: initialize secondary CPU only if master CPU will wait for it

2014-04-10 Thread Igor Mammedov
Hang is observed on virtual machines during CPU hotplug, especially in big guests with many CPUs. (It reproducible more often if host is over-committed). It happens because master CPU gives up waiting on secondary CPU and allows it to run wild. As result AP causes locking or crashing system. For e