• J
    vmscan: don't accumulate scan pressure on unrelated lists · e0f79b8f
    Johannes Weiner 提交于
    During each reclaim scan we accumulate scan pressure on unrelated lists
    which will result in bogus scans and unwanted reclaims eventually.
    
    Scanning lists with few reclaim candidates results in a lot of rotation
    and therefor also disturbs the list balancing, putting even more
    pressure on the wrong lists.
    
    In a test-case with much streaming IO, and therefor a crowded inactive
    file page list, swapping started because
    
      a) anon pages were reclaimed after swap_cluster_max reclaim
      invocations -- nr_scan of this list has just accumulated
    
      b) active file pages were scanned because *their* nr_scan has also
      accumulated through the same logic.  And this in return created a
      lot of rotation for file pages and resulted in a decrease of file
      list priority, again increasing the pressure on anon pages.
    
    The result was an evicted working set of anon pages while there were
    tons of inactive file pages that should have been taken instead.
    Signed-off-by: NJohannes Weiner <hannes@saeurebad.de>
    Reviewed-by: NRik van Riel <riel@redhat.com>
    Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
    e0f79b8f
vmscan.c 71.0 KB