[PATCH] Guarantee that the uncached allocator gets pages on the correct node
authorChristoph Lameter <clameter@sgi.com>
Tue, 26 Sep 2006 06:31:44 +0000 (23:31 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Tue, 26 Sep 2006 15:48:50 +0000 (08:48 -0700)
The uncached allocator manages per node pools.  Specify __GFP_THISNODE in
order to force allocation on the indicated node or fail.  The uncached
allocator has already logic to deal with failing allocations.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Cc: Andy Whitcroft <apw@shadowen.org>
Cc: Mel Gorman <mel@csn.ul.ie>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/ia64/kernel/uncached.c

index 4c73a67636692cad28d089e3f491c61b0353c611..f813caa80570901123fe90cd2b5ef6fd882f9b28 100644 (file)
@@ -98,7 +98,8 @@ static int uncached_add_chunk(struct uncached_pool *uc_pool, int nid)
 
        /* attempt to allocate a granule's worth of cached memory pages */
 
-       page = alloc_pages_node(nid, GFP_KERNEL | __GFP_ZERO,
+       page = alloc_pages_node(nid, GFP_KERNEL | __GFP_ZERO |
+                                __GFP_THISNODE | __GFP_NORETRY | __GFP_NOWARN,
                                IA64_GRANULE_SHIFT-PAGE_SHIFT);
        if (!page) {
                mutex_unlock(&uc_pool->add_chunk_mutex);