Re: Bulk CPU Hotplug (Was Re: [PATCH] Do not force shutdown/reboot to boot cpu.)

2013-04-16 Thread Ingo Molnar
* Robin Holt wrote: > I have the patches sort-of finished. The patch set starts by > moving the halt/shutdown/reboot functions over to a new > kernel/reboot.c, next patch gets a checkpatch.pl cleanup to > work, third patch is essentially the below patch against the > new file, and the fourth

Re: Bulk CPU Hotplug (Was Re: [PATCH] Do not force shutdown/reboot to boot cpu.)

2013-04-16 Thread Ingo Molnar
* Robin Holt h...@sgi.com wrote: I have the patches sort-of finished. The patch set starts by moving the halt/shutdown/reboot functions over to a new kernel/reboot.c, next patch gets a checkpatch.pl cleanup to work, third patch is essentially the below patch against the new file, and the

Re: Bulk CPU Hotplug (Was Re: [PATCH] Do not force shutdown/reboot to boot cpu.)

2013-04-15 Thread Oleg Nesterov
On 04/15, Robin Holt wrote: > > On Sat, Apr 13, 2013 at 06:30:22PM +0200, Oleg Nesterov wrote: > > On 04/12, Robin Holt wrote: > > > > > > +void migrate_to_boot_cpu(void) > > > +{ > > > + /* The boot cpu is always logical cpu 0 */ > > > + int reboot_cpu_id = 0; > > > + > > > + /* Make certain the

Re: Bulk CPU Hotplug (Was Re: [PATCH] Do not force shutdown/reboot to boot cpu.)

2013-04-15 Thread Robin Holt
On Mon, Apr 15, 2013 at 11:04:08AM -0500, Robin Holt wrote: > On Sat, Apr 13, 2013 at 06:30:22PM +0200, Oleg Nesterov wrote: > > On 04/12, Robin Holt wrote: > > > > > > +void migrate_to_boot_cpu(void) > > > +{ > > > + /* The boot cpu is always logical cpu 0 */ > > > + int reboot_cpu_id = 0; > > >

Re: Bulk CPU Hotplug (Was Re: [PATCH] Do not force shutdown/reboot to boot cpu.)

2013-04-15 Thread Robin Holt
On Sat, Apr 13, 2013 at 06:30:22PM +0200, Oleg Nesterov wrote: > On 04/12, Robin Holt wrote: > > > > +void migrate_to_boot_cpu(void) > > +{ > > + /* 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 */ >

Re: Bulk CPU Hotplug (Was Re: [PATCH] Do not force shutdown/reboot to boot cpu.)

2013-04-15 Thread Robin Holt
I have the patches sort-of finished. The patch set starts by moving the halt/shutdown/reboot functions over to a new kernel/reboot.c, next patch gets a checkpatch.pl cleanup to work, third patch is essentially the below patch against the new file, and the fourth patch introduces a kernel boot

Re: Bulk CPU Hotplug (Was Re: [PATCH] Do not force shutdown/reboot to boot cpu.)

2013-04-15 Thread Robin Holt
On Mon, Apr 15, 2013 at 12:16:44PM +0200, Ingo Molnar wrote: > > * Robin Holt wrote: > > > From 1767003c943325e52ac78cac6fdbaf2ab63d Mon Sep 17 00:00:00 2001 > > From: Robin Holt > > Date: Wed, 3 Apr 2013 13:52:00 -0500 > > Subject: [PATCH] Migrate shutdown/reboot to boot cpu. > > > > We

Re: Bulk CPU Hotplug (Was Re: [PATCH] Do not force shutdown/reboot to boot cpu.)

2013-04-15 Thread Ingo Molnar
* Robin Holt wrote: > From 1767003c943325e52ac78cac6fdbaf2ab63d Mon Sep 17 00:00:00 2001 > From: Robin Holt > Date: Wed, 3 Apr 2013 13:52:00 -0500 > Subject: [PATCH] Migrate shutdown/reboot to boot cpu. > > We recently noticed that reboot of a 1024 cpu machine takes approx 16 > minutes of

Re: Bulk CPU Hotplug (Was Re: [PATCH] Do not force shutdown/reboot to boot cpu.)

2013-04-15 Thread Ingo Molnar
* Robin Holt h...@sgi.com wrote: From 1767003c943325e52ac78cac6fdbaf2ab63d Mon Sep 17 00:00:00 2001 From: Robin Holt h...@sgi.com Date: Wed, 3 Apr 2013 13:52:00 -0500 Subject: [PATCH] Migrate shutdown/reboot to boot cpu. We recently noticed that reboot of a 1024 cpu machine takes

Re: Bulk CPU Hotplug (Was Re: [PATCH] Do not force shutdown/reboot to boot cpu.)

2013-04-15 Thread Robin Holt
On Mon, Apr 15, 2013 at 12:16:44PM +0200, Ingo Molnar wrote: * Robin Holt h...@sgi.com wrote: From 1767003c943325e52ac78cac6fdbaf2ab63d Mon Sep 17 00:00:00 2001 From: Robin Holt h...@sgi.com Date: Wed, 3 Apr 2013 13:52:00 -0500 Subject: [PATCH] Migrate shutdown/reboot to boot cpu.

Re: Bulk CPU Hotplug (Was Re: [PATCH] Do not force shutdown/reboot to boot cpu.)

2013-04-15 Thread Robin Holt
I have the patches sort-of finished. The patch set starts by moving the halt/shutdown/reboot functions over to a new kernel/reboot.c, next patch gets a checkpatch.pl cleanup to work, third patch is essentially the below patch against the new file, and the fourth patch introduces a kernel boot

Re: Bulk CPU Hotplug (Was Re: [PATCH] Do not force shutdown/reboot to boot cpu.)

2013-04-15 Thread Robin Holt
On Sat, Apr 13, 2013 at 06:30:22PM +0200, Oleg Nesterov wrote: On 04/12, Robin Holt wrote: +void migrate_to_boot_cpu(void) +{ + /* 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

Re: Bulk CPU Hotplug (Was Re: [PATCH] Do not force shutdown/reboot to boot cpu.)

2013-04-15 Thread Robin Holt
On Mon, Apr 15, 2013 at 11:04:08AM -0500, Robin Holt wrote: On Sat, Apr 13, 2013 at 06:30:22PM +0200, Oleg Nesterov wrote: On 04/12, Robin Holt wrote: +void migrate_to_boot_cpu(void) +{ + /* The boot cpu is always logical cpu 0 */ + int reboot_cpu_id = 0; + + /* Make

Re: Bulk CPU Hotplug (Was Re: [PATCH] Do not force shutdown/reboot to boot cpu.)

2013-04-15 Thread Oleg Nesterov
On 04/15, Robin Holt wrote: On Sat, Apr 13, 2013 at 06:30:22PM +0200, Oleg Nesterov wrote: On 04/12, Robin Holt wrote: +void migrate_to_boot_cpu(void) +{ + /* The boot cpu is always logical cpu 0 */ + int reboot_cpu_id = 0; + + /* Make certain the cpu I'm about to reboot

Re: Bulk CPU Hotplug (Was Re: [PATCH] Do not force shutdown/reboot to boot cpu.)

2013-04-13 Thread Srivatsa S. Bhat
On 04/12/2013 03:01 PM, Robin Holt wrote: > kernel/sys.c | 17 +++-- > 1 file changed, 15 insertions(+), 2 deletions(-) > > diff --git a/kernel/sys.c b/kernel/sys.c > index 0da73cf..4d1047d 100644 > --- a/kernel/sys.c > +++ b/kernel/sys.c > @@ -357,6 +357,19 @@ int

Re: Bulk CPU Hotplug (Was Re: [PATCH] Do not force shutdown/reboot to boot cpu.)

2013-04-13 Thread Oleg Nesterov
On 04/12, Robin Holt wrote: > > +void migrate_to_boot_cpu(void) > +{ > + /* 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 =

Re: Bulk CPU Hotplug (Was Re: [PATCH] Do not force shutdown/reboot to boot cpu.)

2013-04-13 Thread Oleg Nesterov
On 04/12, Robin Holt wrote: +void migrate_to_boot_cpu(void) +{ + /* 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 =

Re: Bulk CPU Hotplug (Was Re: [PATCH] Do not force shutdown/reboot to boot cpu.)

2013-04-13 Thread Srivatsa S. Bhat
On 04/12/2013 03:01 PM, Robin Holt wrote: kernel/sys.c | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/kernel/sys.c b/kernel/sys.c index 0da73cf..4d1047d 100644 --- a/kernel/sys.c +++ b/kernel/sys.c @@ -357,6 +357,19 @@ int

Re: Bulk CPU Hotplug (Was Re: [PATCH] Do not force shutdown/reboot to boot cpu.)

2013-04-12 Thread Robin Holt
Meant to send this to Shawn. Too early in the morning. Robin On Fri, Apr 12, 2013 at 04:31:49AM -0500, Robin Holt wrote: > On Fri, Apr 12, 2013 at 11:39:51AM +0530, Srivatsa S. Bhat wrote: > > On 04/12/2013 11:07 AM, Ingo Molnar wrote: > > > > > > * Robin Holt wrote: > > > > > >> For the

Re: Bulk CPU Hotplug (Was Re: [PATCH] Do not force shutdown/reboot to boot cpu.)

2013-04-12 Thread Robin Holt
On Fri, Apr 12, 2013 at 11:39:51AM +0530, Srivatsa S. Bhat wrote: > On 04/12/2013 11:07 AM, Ingo Molnar wrote: > > > > * Robin Holt wrote: > > > >> For the v3.9 release, can we consider my awful patch? > > > > How about trying what I suggested, to make reboot affine to the boot CPU > >

Re: Bulk CPU Hotplug (Was Re: [PATCH] Do not force shutdown/reboot to boot cpu.)

2013-04-12 Thread Srivatsa S. Bhat
On 04/12/2013 11:07 AM, Ingo Molnar wrote: > > * Robin Holt wrote: > >> For the v3.9 release, can we consider my awful patch? > > How about trying what I suggested, to make reboot affine to the boot CPU > explicitly, not by shutting down all the other CPUs, but by > set_cpus_allowed() or >

Re: Bulk CPU Hotplug (Was Re: [PATCH] Do not force shutdown/reboot to boot cpu.)

2013-04-12 Thread Srivatsa S. Bhat
On 04/12/2013 11:07 AM, Ingo Molnar wrote: * Robin Holt h...@sgi.com wrote: For the v3.9 release, can we consider my awful patch? How about trying what I suggested, to make reboot affine to the boot CPU explicitly, not by shutting down all the other CPUs, but by set_cpus_allowed() or

Re: Bulk CPU Hotplug (Was Re: [PATCH] Do not force shutdown/reboot to boot cpu.)

2013-04-12 Thread Robin Holt
On Fri, Apr 12, 2013 at 11:39:51AM +0530, Srivatsa S. Bhat wrote: On 04/12/2013 11:07 AM, Ingo Molnar wrote: * Robin Holt h...@sgi.com wrote: For the v3.9 release, can we consider my awful patch? How about trying what I suggested, to make reboot affine to the boot CPU

Re: Bulk CPU Hotplug (Was Re: [PATCH] Do not force shutdown/reboot to boot cpu.)

2013-04-12 Thread Robin Holt
Meant to send this to Shawn. Too early in the morning. Robin On Fri, Apr 12, 2013 at 04:31:49AM -0500, Robin Holt wrote: On Fri, Apr 12, 2013 at 11:39:51AM +0530, Srivatsa S. Bhat wrote: On 04/12/2013 11:07 AM, Ingo Molnar wrote: * Robin Holt h...@sgi.com wrote: For the v3.9

Re: Bulk CPU Hotplug (Was Re: [PATCH] Do not force shutdown/reboot to boot cpu.)

2013-04-11 Thread Ingo Molnar
* Robin Holt wrote: > For the v3.9 release, can we consider my awful patch? How about trying what I suggested, to make reboot affine to the boot CPU explicitly, not by shutting down all the other CPUs, but by set_cpus_allowed() or so? That should solve the regression, without the ugly

Re: Bulk CPU Hotplug (Was Re: [PATCH] Do not force shutdown/reboot to boot cpu.)

2013-04-11 Thread Robin Holt
On Thu, Apr 11, 2013 at 03:08:20PM -0500, Russ Anderson wrote: > On Thu, Apr 11, 2013 at 08:15:27PM +0530, Srivatsa S. Bhat wrote: > > On 04/11/2013 07:53 PM, Russ Anderson wrote: > > > On Thu, Apr 11, 2013 at 06:15:18PM +0530, Srivatsa S. Bhat wrote: > > >> > > >> One more thing we have to note

Re: Bulk CPU Hotplug (Was Re: [PATCH] Do not force shutdown/reboot to boot cpu.)

2013-04-11 Thread Srivatsa S. Bhat
On 04/12/2013 01:38 AM, Russ Anderson wrote: > On Thu, Apr 11, 2013 at 08:15:27PM +0530, Srivatsa S. Bhat wrote: >> On 04/11/2013 07:53 PM, Russ Anderson wrote: >>> On Thu, Apr 11, 2013 at 06:15:18PM +0530, Srivatsa S. Bhat wrote: One more thing we have to note is that, there are 4

Re: Bulk CPU Hotplug (Was Re: [PATCH] Do not force shutdown/reboot to boot cpu.)

2013-04-11 Thread Russ Anderson
On Thu, Apr 11, 2013 at 08:15:27PM +0530, Srivatsa S. Bhat wrote: > On 04/11/2013 07:53 PM, Russ Anderson wrote: > > On Thu, Apr 11, 2013 at 06:15:18PM +0530, Srivatsa S. Bhat wrote: > >> > >> One more thing we have to note is that, there are 4 notifiers for taking a > >> CPU offline: > >> > >>

Re: Bulk CPU Hotplug (Was Re: [PATCH] Do not force shutdown/reboot to boot cpu.)

2013-04-11 Thread Srivatsa S. Bhat
On 04/11/2013 07:53 PM, Russ Anderson wrote: > On Thu, Apr 11, 2013 at 06:15:18PM +0530, Srivatsa S. Bhat wrote: >> On 04/11/2013 11:01 AM, Paul Mackerras wrote: >>> On Wed, Apr 10, 2013 at 08:10:05AM -0700, Linus Torvalds wrote: The optimal solution would be to just speed up the

Re: Bulk CPU Hotplug (Was Re: [PATCH] Do not force shutdown/reboot to boot cpu.)

2013-04-11 Thread Russ Anderson
On Thu, Apr 11, 2013 at 06:15:18PM +0530, Srivatsa S. Bhat wrote: > On 04/11/2013 11:01 AM, Paul Mackerras wrote: > > On Wed, Apr 10, 2013 at 08:10:05AM -0700, Linus Torvalds wrote: > >> The optimal solution would be to just speed up the > >> disable_nonboot_cpus() code so much that it isn't an

Re: Bulk CPU Hotplug (Was Re: [PATCH] Do not force shutdown/reboot to boot cpu.)

2013-04-11 Thread Robin Holt
For the v3.9 release, can we consider my awful patch? Thanks, Robin On Thu, Apr 11, 2013 at 06:15:18PM +0530, Srivatsa S. Bhat wrote: > On 04/11/2013 11:01 AM, Paul Mackerras wrote: > > On Wed, Apr 10, 2013 at 08:10:05AM -0700, Linus Torvalds wrote: > >> The optimal solution would be to just

Bulk CPU Hotplug (Was Re: [PATCH] Do not force shutdown/reboot to boot cpu.)

2013-04-11 Thread Srivatsa S. Bhat
On 04/11/2013 11:01 AM, Paul Mackerras wrote: > On Wed, Apr 10, 2013 at 08:10:05AM -0700, Linus Torvalds wrote: >> The optimal solution would be to just speed up the >> disable_nonboot_cpus() code so much that it isn't an issue. That would >> be good for suspending too, although I guess suspend

Bulk CPU Hotplug (Was Re: [PATCH] Do not force shutdown/reboot to boot cpu.)

2013-04-11 Thread Srivatsa S. Bhat
On 04/11/2013 11:01 AM, Paul Mackerras wrote: On Wed, Apr 10, 2013 at 08:10:05AM -0700, Linus Torvalds wrote: The optimal solution would be to just speed up the disable_nonboot_cpus() code so much that it isn't an issue. That would be good for suspending too, although I guess suspend isn't a

Re: Bulk CPU Hotplug (Was Re: [PATCH] Do not force shutdown/reboot to boot cpu.)

2013-04-11 Thread Robin Holt
For the v3.9 release, can we consider my awful patch? Thanks, Robin On Thu, Apr 11, 2013 at 06:15:18PM +0530, Srivatsa S. Bhat wrote: On 04/11/2013 11:01 AM, Paul Mackerras wrote: On Wed, Apr 10, 2013 at 08:10:05AM -0700, Linus Torvalds wrote: The optimal solution would be to just speed up

Re: Bulk CPU Hotplug (Was Re: [PATCH] Do not force shutdown/reboot to boot cpu.)

2013-04-11 Thread Russ Anderson
On Thu, Apr 11, 2013 at 06:15:18PM +0530, Srivatsa S. Bhat wrote: On 04/11/2013 11:01 AM, Paul Mackerras wrote: On Wed, Apr 10, 2013 at 08:10:05AM -0700, Linus Torvalds wrote: The optimal solution would be to just speed up the disable_nonboot_cpus() code so much that it isn't an issue. That

Re: Bulk CPU Hotplug (Was Re: [PATCH] Do not force shutdown/reboot to boot cpu.)

2013-04-11 Thread Srivatsa S. Bhat
On 04/11/2013 07:53 PM, Russ Anderson wrote: On Thu, Apr 11, 2013 at 06:15:18PM +0530, Srivatsa S. Bhat wrote: On 04/11/2013 11:01 AM, Paul Mackerras wrote: On Wed, Apr 10, 2013 at 08:10:05AM -0700, Linus Torvalds wrote: The optimal solution would be to just speed up the

Re: Bulk CPU Hotplug (Was Re: [PATCH] Do not force shutdown/reboot to boot cpu.)

2013-04-11 Thread Russ Anderson
On Thu, Apr 11, 2013 at 08:15:27PM +0530, Srivatsa S. Bhat wrote: On 04/11/2013 07:53 PM, Russ Anderson wrote: On Thu, Apr 11, 2013 at 06:15:18PM +0530, Srivatsa S. Bhat wrote: One more thing we have to note is that, there are 4 notifiers for taking a CPU offline: CPU_DOWN_PREPARE

Re: Bulk CPU Hotplug (Was Re: [PATCH] Do not force shutdown/reboot to boot cpu.)

2013-04-11 Thread Srivatsa S. Bhat
On 04/12/2013 01:38 AM, Russ Anderson wrote: On Thu, Apr 11, 2013 at 08:15:27PM +0530, Srivatsa S. Bhat wrote: On 04/11/2013 07:53 PM, Russ Anderson wrote: On Thu, Apr 11, 2013 at 06:15:18PM +0530, Srivatsa S. Bhat wrote: One more thing we have to note is that, there are 4 notifiers for

Re: Bulk CPU Hotplug (Was Re: [PATCH] Do not force shutdown/reboot to boot cpu.)

2013-04-11 Thread Robin Holt
On Thu, Apr 11, 2013 at 03:08:20PM -0500, Russ Anderson wrote: On Thu, Apr 11, 2013 at 08:15:27PM +0530, Srivatsa S. Bhat wrote: On 04/11/2013 07:53 PM, Russ Anderson wrote: On Thu, Apr 11, 2013 at 06:15:18PM +0530, Srivatsa S. Bhat wrote: One more thing we have to note is that, there

Re: Bulk CPU Hotplug (Was Re: [PATCH] Do not force shutdown/reboot to boot cpu.)

2013-04-11 Thread Ingo Molnar
* Robin Holt h...@sgi.com wrote: For the v3.9 release, can we consider my awful patch? How about trying what I suggested, to make reboot affine to the boot CPU explicitly, not by shutting down all the other CPUs, but by set_cpus_allowed() or so? That should solve the regression, without