aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorEric Dumazet <dada1@cosmosbay.com>2006-03-25 10:31:46 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-25 12:14:38 -0500
commitdcf36bfa5de6d4e37878d4c98b6986fee4eb8b4c (patch)
tree6b18d3efd64e55f14209f40ee3232da2ea25d69e /arch
parent40caa884650fc6931cf55918dbf7496c49b3ddf8 (diff)
[PATCH] x86_64: group memnodemap and memnodeshift in a memnode structure
pfn_to_page() and others need to access both memnode_shift and the very first bytes of memnodemap[]. If we force memnode_shift to be just before the memnodemap array, we can reduce the memory footprint to one cache line instead of two for most setups. This patch introduce a 'memnode' structure where shift and map[] are carefully placed. Signed-off-by: Eric Dumazet <dada1@cosmosbay.com> Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86_64/mm/numa.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/x86_64/mm/numa.c b/arch/x86_64/mm/numa.c
index 07471a3eb190..63c72641b737 100644
--- a/arch/x86_64/mm/numa.c
+++ b/arch/x86_64/mm/numa.c
@@ -25,8 +25,7 @@
25struct pglist_data *node_data[MAX_NUMNODES] __read_mostly; 25struct pglist_data *node_data[MAX_NUMNODES] __read_mostly;
26bootmem_data_t plat_node_bdata[MAX_NUMNODES]; 26bootmem_data_t plat_node_bdata[MAX_NUMNODES];
27 27
28int memnode_shift; 28struct memnode memnode;
29u8 memnodemap[NODEMAPSIZE];
30 29
31unsigned char cpu_to_node[NR_CPUS] __read_mostly = { 30unsigned char cpu_to_node[NR_CPUS] __read_mostly = {
32 [0 ... NR_CPUS-1] = NUMA_NO_NODE 31 [0 ... NR_CPUS-1] = NUMA_NO_NODE
@@ -367,8 +366,7 @@ void __init init_cpu_to_node(void)
367 366
368EXPORT_SYMBOL(cpu_to_node); 367EXPORT_SYMBOL(cpu_to_node);
369EXPORT_SYMBOL(node_to_cpumask); 368EXPORT_SYMBOL(node_to_cpumask);
370EXPORT_SYMBOL(memnode_shift); 369EXPORT_SYMBOL(memnode);
371EXPORT_SYMBOL(memnodemap);
372EXPORT_SYMBOL(node_data); 370EXPORT_SYMBOL(node_data);
373 371
374#ifdef CONFIG_DISCONTIGMEM 372#ifdef CONFIG_DISCONTIGMEM