Re: [Patch -v4 1/4] Migrate shutdown/reboot to boot cpu.

2013-04-19 Thread Ingo Molnar
* Srivatsa S. Bhat wrote: > On 04/19/2013 01:26 PM, Ingo Molnar wrote: > > > > * Borislav Petkov wrote: > > > >> On Wed, Apr 17, 2013 at 09:46:53AM +0200, Ingo Molnar wrote: > >> > >>> What you mention here should indeed already be handled by the > >>> architecture > >>> hotplug code (for e

Re: [Patch -v4 1/4] Migrate shutdown/reboot to boot cpu.

2013-04-19 Thread Srivatsa S. Bhat
On 04/19/2013 01:26 PM, Ingo Molnar wrote: > > * Borislav Petkov wrote: > >> On Wed, Apr 17, 2013 at 09:46:53AM +0200, Ingo Molnar wrote: >> >>> What you mention here should indeed already be handled by the architecture >>> hotplug code (for example on x86 the boot CPU cannot be hot-removed). >

Re: [Patch -v4 1/4] Migrate shutdown/reboot to boot cpu.

2013-04-19 Thread Ingo Molnar
* Borislav Petkov wrote: > On Wed, Apr 17, 2013 at 09:46:53AM +0200, Ingo Molnar wrote: > > > What you mention here should indeed already be handled by the architecture > > hotplug code (for example on x86 the boot CPU cannot be hot-removed). > > Supposedly, some new Intels (I think Ivybridge

Re: [Patch -v4 1/4] Migrate shutdown/reboot to boot cpu.

2013-04-17 Thread Robin Holt
> The get/put_online_cpus() doesn't help in this case, because if a > hotplug operation is started _after_ this function returns, then > your task will get force migrated - which makes the get/put_online_cpus() > pointless. What we need to do is *disable* CPU hotplug altogether. > We need not even

Re: [Patch -v4 1/4] Migrate shutdown/reboot to boot cpu.

2013-04-17 Thread Srivatsa S. Bhat
On 04/17/2013 03:33 PM, Robin Holt wrote: > On Wed, Apr 17, 2013 at 09:48:35AM +0200, Ingo Molnar wrote: >> >> * Robin Holt wrote: >> >>> On Tue, Apr 16, 2013 at 09:18:07PM +0530, Srivatsa S. Bhat wrote: On 04/16/2013 05:36 PM, Robin Holt wrote: > On Tue, Apr 16, 2013 at 01:32:56PM +0200,

Re: [Patch -v4 1/4] Migrate shutdown/reboot to boot cpu.

2013-04-17 Thread Robin Holt
On Wed, Apr 17, 2013 at 09:48:35AM +0200, Ingo Molnar wrote: > > * Robin Holt wrote: > > > On Tue, Apr 16, 2013 at 09:18:07PM +0530, Srivatsa S. Bhat wrote: > > > On 04/16/2013 05:36 PM, Robin Holt wrote: > > > > On Tue, Apr 16, 2013 at 01:32:56PM +0200, Ingo Molnar wrote: > > > >> > > > >> * Ro

Re: [Patch -v4 1/4] Migrate shutdown/reboot to boot cpu.

2013-04-17 Thread Borislav Petkov
On Wed, Apr 17, 2013 at 09:46:53AM +0200, Ingo Molnar wrote: > What you mention here should indeed already be handled by the > architecture hotplug code (for example on x86 the boot CPU cannot be > hot-removed). Supposedly, some new Intels (I think Ivybridge or so) can actually be hot-removed. --

Re: [Patch -v4 1/4] Migrate shutdown/reboot to boot cpu.

2013-04-17 Thread Ingo Molnar
* Robin Holt wrote: > On Tue, Apr 16, 2013 at 09:18:07PM +0530, Srivatsa S. Bhat wrote: > > On 04/16/2013 05:36 PM, Robin Holt wrote: > > > On Tue, Apr 16, 2013 at 01:32:56PM +0200, Ingo Molnar wrote: > > >> > > >> * Robin Holt wrote: > > >> > > >>> We recently noticed that reboot of a 1024 cpu

Re: [Patch -v4 1/4] Migrate shutdown/reboot to boot cpu.

2013-04-17 Thread Ingo Molnar
* Robin Holt wrote: > > reboot_cpu_id = cpumask_first(cpu_online_mask); > > > > > Also, does this codepath prevent hotplug from going on in parallel? > > > > Not sure. I have not considered hotplug. I will look that over when I > > am in the office. > > OK. I have been mulling

Re: [Patch -v4 1/4] Migrate shutdown/reboot to boot cpu.

2013-04-16 Thread Robin Holt
On Tue, Apr 16, 2013 at 09:18:07PM +0530, Srivatsa S. Bhat wrote: > On 04/16/2013 05:36 PM, Robin Holt wrote: > > On Tue, Apr 16, 2013 at 01:32:56PM +0200, Ingo Molnar wrote: > >> > >> * Robin Holt wrote: > >> > >>> We recently noticed that reboot of a 1024 cpu machine takes approx 16 > >>> minute

Re: [Patch -v4 1/4] Migrate shutdown/reboot to boot cpu.

2013-04-16 Thread Srivatsa S. Bhat
On 04/16/2013 05:36 PM, Robin Holt wrote: > On Tue, Apr 16, 2013 at 01:32:56PM +0200, Ingo Molnar wrote: >> >> * Robin Holt wrote: >> >>> We recently noticed that reboot of a 1024 cpu machine takes approx 16 >>> minutes of just stopping the cpus. The slowdown was tracked to commit >>> f96972f. >>

Re: [Patch -v4 1/4] Migrate shutdown/reboot to boot cpu.

2013-04-16 Thread Robin Holt
> > > +{ > > > + /* The boot cpu is always logical cpu 0 */ > > > + int reboot_cpu_id = 0; > > > + > > > + /* Make certain the cpu I'm about to reboot on is online */ > > > + if (!cpu_online(reboot_cpu_id)) > > > + reboot_cpu_id = smp_processor_id(); > > > > Shouldn't we pick the first onl

Re: [Patch -v4 1/4] Migrate shutdown/reboot to boot cpu.

2013-04-16 Thread Robin Holt
On Tue, Apr 16, 2013 at 01:32:56PM +0200, Ingo Molnar wrote: > > * Robin Holt wrote: > > > We recently noticed that reboot of a 1024 cpu machine takes approx 16 > > minutes of just stopping the cpus. The slowdown was tracked to commit > > f96972f. > > > > The current implementation does all th

Re: [Patch -v4 1/4] Migrate shutdown/reboot to boot cpu.

2013-04-16 Thread Ingo Molnar
* Robin Holt wrote: > We recently noticed that reboot of a 1024 cpu machine takes approx 16 > minutes of just stopping the cpus. The slowdown was tracked to commit > f96972f. > > The current implementation does all the work of hot removing the cpus > before halting the system. We are switchin

[Patch -v4 1/4] Migrate shutdown/reboot to boot cpu.

2013-04-16 Thread Robin Holt
We recently noticed that reboot of a 1024 cpu machine takes approx 16 minutes of just stopping the cpus. The slowdown was tracked to commit f96972f. The current implementation does all the work of hot removing the cpus before halting the system. We are switching to just migrating to the boot cpu