public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] - Increase max SSI size
@ 2007-04-12 17:58 Jack Steiner
  2007-04-12 18:06 ` Luck, Tony
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Jack Steiner @ 2007-04-12 17:58 UTC (permalink / raw)
  To: linux-ia64

Increase the maximum SSI size for IA64 to 4096p. No changes are being
made to the default configuration sizes (for now).

	Signed-off-by: Jack Steiner <steiner@sgi.com>


Index: linux/arch/ia64/Kconfig
=================================--- linux.orig/arch/ia64/Kconfig	2007-04-04 16:51:42.000000000 -0500
+++ linux/arch/ia64/Kconfig	2007-04-12 07:41:44.619991642 -0500
@@ -267,8 +267,8 @@ config SMP
 	  If you don't know what to do here, say N.
 
 config NR_CPUS
-	int "Maximum number of CPUs (2-1024)"
-	range 2 1024
+	int "Maximum number of CPUs (2-4096)"
+	range 2 4096
 	depends on SMP
 	default "1024"
 	help
Index: linux/arch/ia64/kernel/topology.c
=================================--- linux.orig/arch/ia64/kernel/topology.c	2007-04-04 16:51:42.000000000 -0500
+++ linux/arch/ia64/kernel/topology.c	2007-04-12 08:08:30.526370615 -0500
@@ -21,6 +21,7 @@
 #include <linux/bootmem.h>
 #include <linux/nodemask.h>
 #include <linux/notifier.h>
+#include <linux/vmalloc.h>
 #include <asm/mmzone.h>
 #include <asm/numa.h>
 #include <asm/cpu.h>
@@ -68,7 +69,8 @@ static int __init topology_init(void)
 	}
 #endif
 
-	sysfs_cpus = kzalloc(sizeof(struct ia64_cpu) * NR_CPUS, GFP_KERNEL);
+	sysfs_cpus = vmalloc(sizeof(struct ia64_cpu) * NR_CPUS);
+	memset(sysfs_cpus, 0, sizeof(sizeof(struct ia64_cpu) * NR_CPUS));
 	if (!sysfs_cpus)
 		panic("kzalloc in topology_init failed - NR_CPUS too big?");
 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: [PATCH] - Increase max SSI size
  2007-04-12 17:58 [PATCH] - Increase max SSI size Jack Steiner
@ 2007-04-12 18:06 ` Luck, Tony
  2007-04-12 18:38 ` Christoph Lameter
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Luck, Tony @ 2007-04-12 18:06 UTC (permalink / raw)
  To: linux-ia64

-	sysfs_cpus = kzalloc(sizeof(struct ia64_cpu) * NR_CPUS, GFP_KERNEL);
+	sysfs_cpus = vmalloc(sizeof(struct ia64_cpu) * NR_CPUS);
+	memset(sysfs_cpus, 0, sizeof(sizeof(struct ia64_cpu) * NR_CPUS));
 	if (!sysfs_cpus)
 		panic("kzalloc in topology_init failed - NR_CPUS too big?");
 

How about having the check "if (!sysfs_cpus)" before the memset()?

-Tony

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] - Increase max SSI size
  2007-04-12 17:58 [PATCH] - Increase max SSI size Jack Steiner
  2007-04-12 18:06 ` Luck, Tony
@ 2007-04-12 18:38 ` Christoph Lameter
  2007-04-12 18:39 ` Jack Steiner
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Christoph Lameter @ 2007-04-12 18:38 UTC (permalink / raw)
  To: linux-ia64

On Thu, 12 Apr 2007, Jack Steiner wrote:

> -	sysfs_cpus = kzalloc(sizeof(struct ia64_cpu) * NR_CPUS, GFP_KERNEL);
> +	sysfs_cpus = vmalloc(sizeof(struct ia64_cpu) * NR_CPUS);
> +	memset(sysfs_cpus, 0, sizeof(sizeof(struct ia64_cpu) * NR_CPUS));
>  	if (!sysfs_cpus)
>  		panic("kzalloc in topology_init failed - NR_CPUS too big?");

Consider using nr_cpu_ids instead of NR_CPUS. This will allocate a smaller 
array on systems that support just a handful of processors.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] - Increase max SSI size
  2007-04-12 17:58 [PATCH] - Increase max SSI size Jack Steiner
  2007-04-12 18:06 ` Luck, Tony
  2007-04-12 18:38 ` Christoph Lameter
@ 2007-04-12 18:39 ` Jack Steiner
  2007-05-16 21:40 ` FW: " Robin Holt
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Jack Steiner @ 2007-04-12 18:39 UTC (permalink / raw)
  To: linux-ia64

Increase the maximum SSI size for IA64 to 4096p. No changes are being
made to the default configuration sizes (for now).

	Signed-off-by: Jack Steiner <steiner@sgi.com>

---
With bug fix that Tony found....



Index: linux/arch/ia64/Kconfig
=================================--- linux.orig/arch/ia64/Kconfig	2007-04-04 16:51:42.000000000 -0500
+++ linux/arch/ia64/Kconfig	2007-04-12 07:41:44.619991642 -0500
@@ -267,8 +267,8 @@ config SMP
 	  If you don't know what to do here, say N.
 
 config NR_CPUS
-	int "Maximum number of CPUs (2-1024)"
-	range 2 1024
+	int "Maximum number of CPUs (2-4096)"
+	range 2 4096
 	depends on SMP
 	default "1024"
 	help
Index: linux/arch/ia64/kernel/topology.c
=================================--- linux.orig/arch/ia64/kernel/topology.c	2007-04-04 16:51:42.000000000 -0500
+++ linux/arch/ia64/kernel/topology.c	2007-04-12 13:37:05.855795475 -0500
@@ -21,6 +21,7 @@
 #include <linux/bootmem.h>
 #include <linux/nodemask.h>
 #include <linux/notifier.h>
+#include <linux/vmalloc.h>
 #include <asm/mmzone.h>
 #include <asm/numa.h>
 #include <asm/cpu.h>
@@ -68,10 +69,11 @@ static int __init topology_init(void)
 	}
 #endif
 
-	sysfs_cpus = kzalloc(sizeof(struct ia64_cpu) * NR_CPUS, GFP_KERNEL);
+	sysfs_cpus = vmalloc(sizeof(struct ia64_cpu) * NR_CPUS);
 	if (!sysfs_cpus)
 		panic("kzalloc in topology_init failed - NR_CPUS too big?");
 
+	memset(sysfs_cpus, 0, sizeof(sizeof(struct ia64_cpu) * NR_CPUS));
 	for_each_present_cpu(i) {
 		if((err = arch_register_cpu(i)))
 			goto out;

^ permalink raw reply	[flat|nested] 7+ messages in thread

* FW: Re: [PATCH] - Increase max SSI size
  2007-04-12 17:58 [PATCH] - Increase max SSI size Jack Steiner
                   ` (2 preceding siblings ...)
  2007-04-12 18:39 ` Jack Steiner
@ 2007-05-16 21:40 ` Robin Holt
  2007-05-16 22:18 ` Luck, Tony
  2007-05-16 22:20 ` Robin Holt
  5 siblings, 0 replies; 7+ messages in thread
From: Robin Holt @ 2007-05-16 21:40 UTC (permalink / raw)
  To: linux-ia64

Tony,

Did this make it onto your radar?  Jack had submitted a fixed patch,
but I have not seen it sent to Linus yet.  Jack is on vacation right now.
If you need it resubmitted, please let me know and I will impersonate him.

Thanks,
Robin

----- Forwarded message from Jack Steiner <steiner@sgi.com> -----

Date:	Thu, 12 Apr 2007 13:39:01 -0500
From: Jack Steiner <steiner@sgi.com>
To: tony.luck@intel.com
Cc: linux-ia64@vger.kernel.org
Subject: Re: [PATCH] - Increase max SSI size

Increase the maximum SSI size for IA64 to 4096p. No changes are being
made to the default configuration sizes (for now).

	Signed-off-by: Jack Steiner <steiner@sgi.com>

---
With bug fix that Tony found....



Index: linux/arch/ia64/Kconfig
=================================--- linux.orig/arch/ia64/Kconfig	2007-04-04 16:51:42.000000000 -0500
+++ linux/arch/ia64/Kconfig	2007-04-12 07:41:44.619991642 -0500
@@ -267,8 +267,8 @@ config SMP
 	  If you don't know what to do here, say N.
 
 config NR_CPUS
-	int "Maximum number of CPUs (2-1024)"
-	range 2 1024
+	int "Maximum number of CPUs (2-4096)"
+	range 2 4096
 	depends on SMP
 	default "1024"
 	help
Index: linux/arch/ia64/kernel/topology.c
=================================--- linux.orig/arch/ia64/kernel/topology.c	2007-04-04 16:51:42.000000000 -0500
+++ linux/arch/ia64/kernel/topology.c	2007-04-12 13:37:05.855795475 -0500
@@ -21,6 +21,7 @@
 #include <linux/bootmem.h>
 #include <linux/nodemask.h>
 #include <linux/notifier.h>
+#include <linux/vmalloc.h>
 #include <asm/mmzone.h>
 #include <asm/numa.h>
 #include <asm/cpu.h>
@@ -68,10 +69,11 @@ static int __init topology_init(void)
 	}
 #endif
 
-	sysfs_cpus = kzalloc(sizeof(struct ia64_cpu) * NR_CPUS, GFP_KERNEL);
+	sysfs_cpus = vmalloc(sizeof(struct ia64_cpu) * NR_CPUS);
 	if (!sysfs_cpus)
 		panic("kzalloc in topology_init failed - NR_CPUS too big?");
 
+	memset(sysfs_cpus, 0, sizeof(sizeof(struct ia64_cpu) * NR_CPUS));
 	for_each_present_cpu(i) {
 		if((err = arch_register_cpu(i)))
 			goto out;
-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

----- End forwarded message -----

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: Re: [PATCH] - Increase max SSI size
  2007-04-12 17:58 [PATCH] - Increase max SSI size Jack Steiner
                   ` (3 preceding siblings ...)
  2007-05-16 21:40 ` FW: " Robin Holt
@ 2007-05-16 22:18 ` Luck, Tony
  2007-05-16 22:20 ` Robin Holt
  5 siblings, 0 replies; 7+ messages in thread
From: Luck, Tony @ 2007-05-16 22:18 UTC (permalink / raw)
  To: linux-ia64

> Did this make it onto your radar?  Jack had submitted a fixed patch,
> but I have not seen it sent to Linus yet.  Jack is on vacation right now.
> If you need it resubmitted, please let me know and I will impersonate him.

I'd skipped over it.  Just tried it though and something
is wrong.  I took arch/ia64/gendefconfig and tweaked the
number of cpus up to 4096.  When I tried to boot it on a
16-way Montecito I got an oops during boot.  The full text
scrolled off the screen, but the last part of the stacktrace
said:

 kernel_init -> topology_init -> arch_register_cpu -> register_cpu ->

    sysdev_register -> kobject_set_name -> kfree

-Tony

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Re: [PATCH] - Increase max SSI size
  2007-04-12 17:58 [PATCH] - Increase max SSI size Jack Steiner
                   ` (4 preceding siblings ...)
  2007-05-16 22:18 ` Luck, Tony
@ 2007-05-16 22:20 ` Robin Holt
  5 siblings, 0 replies; 7+ messages in thread
From: Robin Holt @ 2007-05-16 22:20 UTC (permalink / raw)
  To: linux-ia64

On Wed, May 16, 2007 at 03:18:27PM -0700, Luck, Tony wrote:
> > Did this make it onto your radar?  Jack had submitted a fixed patch,
> > but I have not seen it sent to Linus yet.  Jack is on vacation right now.
> > If you need it resubmitted, please let me know and I will impersonate him.
> 
> I'd skipped over it.  Just tried it though and something
> is wrong.  I took arch/ia64/gendefconfig and tweaked the
> number of cpus up to 4096.  When I tried to boot it on a
> 16-way Montecito I got an oops during boot.  The full text
> scrolled off the screen, but the last part of the stacktrace
> said:
> 
>  kernel_init -> topology_init -> arch_register_cpu -> register_cpu ->
> 
>     sysdev_register -> kobject_set_name -> kfree

Let me give it a try.

Thanks,
Robin

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2007-05-16 22:20 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-12 17:58 [PATCH] - Increase max SSI size Jack Steiner
2007-04-12 18:06 ` Luck, Tony
2007-04-12 18:38 ` Christoph Lameter
2007-04-12 18:39 ` Jack Steiner
2007-05-16 21:40 ` FW: " Robin Holt
2007-05-16 22:18 ` Luck, Tony
2007-05-16 22:20 ` Robin Holt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox