summaryrefslogtreecommitdiff
path: root/include/asm-ppc64
diff options
context:
space:
mode:
authorAnton Blanchard <anton@samba.org>2004-09-02 20:24:41 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-09-02 20:24:41 -0700
commitd19b41b986d420ff46f6d575ccfcb421b73ba43f (patch)
treecc9fbd82f0a4722c40b45f4fcf9d7fa403973165 /include/asm-ppc64
parentc9f2bc8bdfc6de1be624447ee560e14204010dd6 (diff)
[PATCH] ppc64: allocate NUMA node data node locally
Instead of statically allocating the NUMA node structures, do it at runtime with node local memory where possible. With NR_CPUS=128 we had over 800kB of memory allocated before this patch, now we allocate only as many nodes as the machine requires. We have to do some fancy footwork in do_init_bootmem since we use both the LMB allocator and the bootmem allocator at the same time. The problem has always been there although I only recently found a test case that hit it. Wrap that logic in careful_allocation which uses the LMB allocator then falls back to the bootmem allocator if required. Now alloc_bootmem on a node with no memory doesnt panic, we dont need the hack in paging_init so remove it. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/asm-ppc64')
-rw-r--r--include/asm-ppc64/mmzone.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/asm-ppc64/mmzone.h b/include/asm-ppc64/mmzone.h
index 6903024ff31f..0619a41a3c9d 100644
--- a/include/asm-ppc64/mmzone.h
+++ b/include/asm-ppc64/mmzone.h
@@ -12,7 +12,7 @@
#ifdef CONFIG_DISCONTIGMEM
-extern struct pglist_data node_data[];
+extern struct pglist_data *node_data[];
/*
* Following are specific to this numa platform.
@@ -52,7 +52,7 @@ static inline int pa_to_nid(unsigned long pa)
/*
* Return a pointer to the node data for node n.
*/
-#define NODE_DATA(nid) (&node_data[nid])
+#define NODE_DATA(nid) (node_data[nid])
#define node_localnr(pfn, nid) ((pfn) - NODE_DATA(nid)->node_start_pfn)