• Rik van Riel's avatar
    more aggressively use lumpy reclaim · 33c120ed
    Rik van Riel authored
    During an AIM7 run on a 16GB system, fork started failing around 32000
    threads, despite the system having plenty of free swap and 15GB of
    pageable memory.  This was on x86-64, so 8k stacks.
    
    If a higher order allocation fails, we can either:
    - keep evicting pages off the end of the LRUs and hope that
      we eventually create a contiguous region; this is somewhat
      unlikely if the system is under enough stress by new
      allocations
    - after trying normal eviction for a bit, use lumpy reclaim
    
    This patch switches the system to lumpy reclaim if the VM is having
    trouble freeing enough pages, using the same threshold for detection as
    used by pageout congestion wait.
    Signed-off-by: default avatarRik van Riel <riel@redhat.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    33c120ed
vmscan.c 60.5 KB