• Andrew Morton's avatar
    [PATCH] fix a bogus OOM condition for __GFP_NOFS allocations · 483a40e4
    Andrew Morton authored
    If a GFP_NOFS allocation is made when the ZONE_NORMAL inactive list is
    full of dirty or under-writeback pages, there is nothing the caller can
    do to force some page reclaim.  The caller ends up getting oom-killed.
    
    - In mempool_alloc(), don't try to perform page reclaim again.  Just
      go to sleep and wait for some elements to be returned to the pool.
    
    - In try_to_free_pages(): perform a single, short scan of the LRU and
      if that doesn't work, fail the allocation.  GFP_NOFS allocators know
      how to handle that.
    483a40e4
vmscan.c 19.3 KB