From 4f05c96ce3e22a0d795063f520a12da72e619ec3 Mon Sep 17 00:00:00 2001 From: David Rientjes Date: Mon, 24 May 2010 14:32:13 -0700 Subject: [PATCH] --- yaml --- r: 198236 b: refs/heads/master c: e325c90ffc13b698fa2814102e05275b21c26bec h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/mm/page_alloc.c | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 0cea6fc1e7b0..618ec75805f6 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 1a5cb81465b66b74bf3d6ad36e5382238de6a132 +refs/heads/master: e325c90ffc13b698fa2814102e05275b21c26bec diff --git a/trunk/mm/page_alloc.c b/trunk/mm/page_alloc.c index f7da2a2934b7..cefe6fe8d991 100644 --- a/trunk/mm/page_alloc.c +++ b/trunk/mm/page_alloc.c @@ -2606,7 +2606,7 @@ static int default_zonelist_order(void) * ZONE_DMA and ZONE_DMA32 can be very small area in the system. * If they are really small and used heavily, the system can fall * into OOM very easily. - * This function detect ZONE_DMA/DMA32 size and confgigures zone order. + * This function detect ZONE_DMA/DMA32 size and configures zone order. */ /* Is there ZONE_NORMAL ? (ex. ppc has only DMA zone..) */ low_kmem_size = 0; @@ -2618,6 +2618,15 @@ static int default_zonelist_order(void) if (zone_type < ZONE_NORMAL) low_kmem_size += z->present_pages; total_size += z->present_pages; + } else if (zone_type == ZONE_NORMAL) { + /* + * If any node has only lowmem, then node order + * is preferred to allow kernel allocations + * locally; otherwise, they can easily infringe + * on other nodes when there is an abundance of + * lowmem available to allocate from. + */ + return ZONELIST_ORDER_NODE; } } }