From 6c869dcdbd132ca2a5fa11573fd499f6d463f10a Mon Sep 17 00:00:00 2001 From: Dave Hansen Date: Tue, 9 Dec 2008 08:21:32 +0000 Subject: [PATCH] --- yaml --- r: 127665 b: refs/heads/master c: c555e520ef794a94dc36a8ded93ece6369ff7ca0 h: refs/heads/master i: 127663: 650b05c13d9f6101ef21b2c7a12b5348485ff39d v: v3 --- [refs] | 2 +- trunk/arch/powerpc/mm/numa.c | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index fc9deeec1696..18765fa9de9c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: afcb065450913745027169d906b9afc8294f7007 +refs/heads/master: c555e520ef794a94dc36a8ded93ece6369ff7ca0 diff --git a/trunk/arch/powerpc/mm/numa.c b/trunk/arch/powerpc/mm/numa.c index cf81049e1e51..213664c9cdca 100644 --- a/trunk/arch/powerpc/mm/numa.c +++ b/trunk/arch/powerpc/mm/numa.c @@ -840,8 +840,16 @@ static void __init *careful_allocation(int nid, unsigned long size, size, nid); /* - * If the memory came from a previously allocated node, we must - * retry with the bootmem allocator. + * We initialize the nodes in numeric order: 0, 1, 2... + * and hand over control from the LMB allocator to the + * bootmem allocator. If this function is called for + * node 5, then we know that all nodes <5 are using the + * bootmem allocator instead of the LMB allocator. + * + * So, check the nid from which this allocation came + * and double check to see if we need to use bootmem + * instead of the LMB. We don't free the LMB memory + * since it would be useless. */ new_nid = early_pfn_to_nid(ret >> PAGE_SHIFT); if (new_nid < nid) {