--- ./mm/page_alloc.c.mmreb 2005-10-28 04:02:08.000000000 +0400 +++ ./mm/page_alloc.c 2005-11-08 16:32:36.000000000 +0300 @@ -867,6 +867,7 @@ zone_reclaim_retry: /* This allocation should allow future memory freeing. */ +rebalance: if (((p->flags & PF_MEMALLOC) || unlikely(test_thread_flag(TIF_MEMDIE))) && !in_interrupt()) { if (!(gfp_mask & __GFP_NOMEMALLOC)) { @@ -879,14 +880,13 @@ zone_reclaim_retry: goto got_pg; } } - goto nopage; + goto empty; } /* Atomic allocations - we can't balance anything */ if (!wait) goto nopage; -rebalance: cond_resched(); /* We now go into synchronous reclaim */ @@ -946,6 +946,7 @@ rebalance: * In this implementation, __GFP_REPEAT means __GFP_NOFAIL for order * <= 3, but that may not be true in other implementations. */ +empty: do_retry = 0; if (!(gfp_mask & __GFP_NORETRY)) { if ((order <= 3) || (gfp_mask & __GFP_REPEAT))