Skip to contentSkip to conversation

- Increase max number of nodes (cpu_to_node_map)

PATCH In review Jack Steiner 2 participants 3 messages Nov 5, 2003 – Nov 6, 2003

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 - Increase max number of nodes (cpu_to_node_map)

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.

arch/ia64/kernel/smpboot.c +1 -1
@@ -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;
 
include/asm-ia64/numa.h +1 -1
@@ -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 */
Signature · 4 lines
Thanks

Jack Steiner ([email protected])          651-683-5302
Principal Engineer                      SGI - Silicon Graphics, Inc.
#1 lore raw
Quoted 5 lines · Jack Steiner

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?

Signature · 3 lines
"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
#2 lore raw
In reply to Jack Steiner
Quoted 9 lines · Matthew Wilcox
Quoted 5 lines · Jack Steiner

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.

Signature · 4 lines
Thanks

Jack Steiner ([email protected])          651-683-5302
Principal Engineer                      SGI - Silicon Graphics, Inc.