public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] - Increase max number of nodes (cpu_to_node_map)
@ 2003-11-05 19:44 Jack Steiner
  2003-11-06 17:06 ` Matthew Wilcox
  2003-11-06 17:43 ` Jack Steiner
  0 siblings, 2 replies; 3+ messages in thread
From: Jack Steiner @ 2003-11-05 19:44 UTC (permalink / raw)
  To: linux-ia64

I hit a problem with systems having > 256 nodes. The
cpu_to_node_map array is an array of char - needs to be 
bigger.

Here is a patch that changes it to a short.



--- linux_base/arch/ia64/kernel/smpboot.c	Wed Nov  5 08:39:40 2003
+++ linux/arch/ia64/kernel/smpboot.c	Wed Nov  5 12:30:12 2003
@@ -466,7 +466,7 @@
 #ifdef CONFIG_NUMA
 
 /* on which node is each logical CPU (one cacheline even for 64 CPUs) */
-volatile char cpu_to_node_map[NR_CPUS] __cacheline_aligned;
+volatile short cpu_to_node_map[NR_CPUS] __cacheline_aligned;
 /* which logical CPUs are on which nodes */
 volatile cpumask_t node_to_cpu_mask[MAX_NUMNODES] __cacheline_aligned;
 
--- linux_base/include/asm-ia64/numa.h	Wed Nov  5 12:49:18 2003
+++ linux/include/asm-ia64/numa.h	Wed Nov  5 12:31:04 2003
@@ -24,7 +24,7 @@
 
 #include <asm/mmzone.h>
 
-extern volatile char cpu_to_node_map[NR_CPUS] __cacheline_aligned;
+extern volatile short cpu_to_node_map[NR_CPUS] __cacheline_aligned;
 extern volatile cpumask_t node_to_cpu_mask[MAX_NUMNODES] __cacheline_aligned;
 
 /* Stuff below this line could be architecture independent */




-- 
Thanks

Jack Steiner (steiner@sgi.com)          651-683-5302
Principal Engineer                      SGI - Silicon Graphics, Inc.



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

* Re: [PATCH] - Increase max number of nodes (cpu_to_node_map)
  2003-11-05 19:44 [PATCH] - Increase max number of nodes (cpu_to_node_map) Jack Steiner
@ 2003-11-06 17:06 ` Matthew Wilcox
  2003-11-06 17:43 ` Jack Steiner
  1 sibling, 0 replies; 3+ messages in thread
From: Matthew Wilcox @ 2003-11-06 17:06 UTC (permalink / raw)
  To: linux-ia64

On Wed, Nov 05, 2003 at 01:44:17PM -0600, Jack Steiner wrote:
> I hit a problem with systems having > 256 nodes. The
> cpu_to_node_map array is an array of char - needs to be 
> bigger.
> 
> Here is a patch that changes it to a short.

shouldn't that be an unsigned short so we don't run into problems
when adding the 32769th processor?

-- 
"It's not Hollywood.  War is real, war is primarily not about defeat or
victory, it is about death.  I've seen thousands and thousands of dead bodies.
Do you think I want to have an academic debate on this subject?" -- Robert Fisk

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

* Re: [PATCH] - Increase max number of nodes (cpu_to_node_map)
  2003-11-05 19:44 [PATCH] - Increase max number of nodes (cpu_to_node_map) Jack Steiner
  2003-11-06 17:06 ` Matthew Wilcox
@ 2003-11-06 17:43 ` Jack Steiner
  1 sibling, 0 replies; 3+ messages in thread
From: Jack Steiner @ 2003-11-06 17:43 UTC (permalink / raw)
  To: linux-ia64

On Thu, Nov 06, 2003 at 05:06:04PM +0000, Matthew Wilcox wrote:
> On Wed, Nov 05, 2003 at 01:44:17PM -0600, Jack Steiner wrote:
> > I hit a problem with systems having > 256 nodes. The
> > cpu_to_node_map array is an array of char - needs to be 
> > bigger.
> > 
> > Here is a patch that changes it to a short.
> 
> shouldn't that be an unsigned short so we don't run into problems
> when adding the 32769th processor?


Either signed or unsigned works for me. 

I didnt initially make it unsigned because a number of structures use 
negative values to indicate non-existant cpus or nodes. However, that 
doesnt currently apply in this case.


-- 
Thanks

Jack Steiner (steiner@sgi.com)          651-683-5302
Principal Engineer                      SGI - Silicon Graphics, Inc.



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

end of thread, other threads:[~2003-11-06 17:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-11-05 19:44 [PATCH] - Increase max number of nodes (cpu_to_node_map) Jack Steiner
2003-11-06 17:06 ` Matthew Wilcox
2003-11-06 17:43 ` Jack Steiner

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