summaryrefslogtreecommitdiffstats
path: root/mm/vmalloc.c
diff options
context:
space:
mode:
authorJohannes Weiner2016-12-13 01:43:58 +0100
committerLinus Torvalds2016-12-13 03:55:08 +0100
commitb53889987862b69179560e50992f7ea8a5eb61ed (patch)
treefa95a579897d329549fd013cc63e516a1dcfb58c /mm/vmalloc.c
parentmm: workingset: restore refault tracking for single-page files (diff)
downloadkernel-qcow2-linux-b53889987862b69179560e50992f7ea8a5eb61ed.tar.gz
kernel-qcow2-linux-b53889987862b69179560e50992f7ea8a5eb61ed.tar.xz
kernel-qcow2-linux-b53889987862b69179560e50992f7ea8a5eb61ed.zip
mm: workingset: update shadow limit to reflect bigger active list
Since commit 59dc76b0d4df ("mm: vmscan: reduce size of inactive file list") the size of the active file list is no longer limited to half of memory. Increase the shadow node limit accordingly to avoid throwing out shadow entries that might still result in eligible refaults. The exact size of the active list now depends on the overall size of the page cache, but converges toward taking up most of the space: In mm/vmscan.c::inactive_list_is_low(), * total target max * memory ratio inactive * ------------------------------------- * 10MB 1 5MB * 100MB 1 50MB * 1GB 3 250MB * 10GB 10 0.9GB * 100GB 31 3GB * 1TB 101 10GB * 10TB 320 32GB It would be possible to apply the same precise ratios when determining the limit for radix tree nodes containing shadow entries, but since it is merely an approximation of the oldest refault distances in the wild and the code also makes assumptions about the node population density, keep it simple and always target the full cache size. While at it, clarify the comment and the formula for memory footprint. Link: http://lkml.kernel.org/r/20161117214701.29000-1-hannes@cmpxchg.org Signed-off-by: Johannes Weiner <hannes@cmpxchg.org> Cc: Rik van Riel <riel@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/vmalloc.c')
0 files changed, 0 insertions, 0 deletions