Skip to content
  • Rik van Riel's avatar
    mm: vmscan: reduce size of inactive file list · 59dc76b0
    Rik van Riel authored
    
    
    The inactive file list should still be large enough to contain readahead
    windows and freshly written file data, but it no longer is the only
    source for detecting multiple accesses to file pages.  The workingset
    refault measurement code causes recently evicted file pages that get
    accessed again after a shorter interval to be promoted directly to the
    active list.
    
    With that mechanism in place, we can afford to (on a larger system)
    dedicate more memory to the active file list, so we can actually cache
    more of the frequently used file pages in memory, and not have them
    pushed out by streaming writes, once-used streaming file reads, etc.
    
    This can help things like database workloads, where only half the page
    cache can currently be used to cache the database working set.  This
    patch automatically increases that fraction on larger systems, using the
    same ratio that has already been used for anonymous memory.
    
    [hannes@cmpxchg.org: cgroup-awareness]
    Signed-off-by: default avatarRik van Riel <riel@redhat.com>
    Signed-off-by: default avatarJohannes Weiner <hannes@cmpxchg.org>
    Reported-by: default avatarAndres Freund <andres@anarazel.de>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    59dc76b0