summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorEric Dumazet <dada1@cosmosbay.com>2006-03-25 16:31:46 +0100
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-25 09:14:38 -0800
commitdcf36bfa5de6d4e37878d4c98b6986fee4eb8b4c (patch)
tree6b18d3efd64e55f14209f40ee3232da2ea25d69e /include
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 'include')
-rw-r--r--include/asm-x86_64/mmzone.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/include/asm-x86_64/mmzone.h b/include/asm-x86_64/mmzone.h
index 972c9359f7d7..937f99b26883 100644
--- a/include/asm-x86_64/mmzone.h
+++ b/include/asm-x86_64/mmzone.h
@@ -15,8 +15,13 @@
#define NODEMAPSIZE 0xfff
/* Simple perfect hash to map physical addresses to node numbers */
-extern int memnode_shift;
-extern u8 memnodemap[NODEMAPSIZE];
+struct memnode {
+ int shift;
+ u8 map[NODEMAPSIZE];
+} ____cacheline_aligned;
+extern struct memnode memnode;
+#define memnode_shift memnode.shift
+#define memnodemap memnode.map
extern struct pglist_data *node_data[];