• Nick Piggin's avatar
    [PATCH] oom: reclaim_mapped on oom · 4ff1ffb4
    Nick Piggin authored
    Potentially it takes several scans of the lru lists before we can even start
    reclaiming pages.
    
    mapped pages, with young ptes can take 2 passes on the active list + one on
    the inactive list.  But reclaim_mapped may not always kick in instantly, so it
    could take even more than that.
    
    Raise the threshold for marking a zone as all_unreclaimable from a factor of 4
    time the pages in the zone to 6.  Introduce a mechanism to force
    reclaim_mapped if we've reached a factor 3 and still haven't made progress.
    
    Previously, a customer doing stress testing was able to easily OOM the box
    after using only a small fraction of its swap (~100MB).  After the patches, it
    would only OOM after having used up all swap (~800MB).
    Signed-off-by: default avatarNick Piggin <npiggin@suse.de>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    4ff1ffb4
vmscan.c 44.1 KB