Reclaim on an atomic allocation Simply call reclaim if we get to a point where we cannot perform the desired atomic allocation. If the reclaim is successful then simply restart the allocation. Signed-off-by: Christoph Lameter --- mm/page_alloc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) Index: linux-2.6/mm/page_alloc.c =================================================================== --- linux-2.6.orig/mm/page_alloc.c 2007-08-13 21:40:27.000000000 -0700 +++ linux-2.6/mm/page_alloc.c 2007-08-13 21:41:40.000000000 -0700 @@ -1326,8 +1326,11 @@ nofail_alloc: } /* Atomic allocations - we can't balance anything */ - if (!wait) + if (!wait) { + if (try_to_free_pages(zonelist->zones, order, gfp_mask)) + goto restart; goto nopage; + } cond_resched();