]> git.hungrycats.org Git - linux/commit
[PATCH] ppc64: allocate NUMA node data node locally
authorAnton Blanchard <anton@samba.org>
Fri, 3 Sep 2004 03:24:41 +0000 (20:24 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Fri, 3 Sep 2004 03:24:41 +0000 (20:24 -0700)
commitd19b41b986d420ff46f6d575ccfcb421b73ba43f
treecc9fbd82f0a4722c40b45f4fcf9d7fa403973165
parentc9f2bc8bdfc6de1be624447ee560e14204010dd6
[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>
arch/ppc64/mm/init.c
arch/ppc64/mm/numa.c
include/asm-ppc64/mmzone.h