aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorVladimir Davydov <[email protected]>2015-02-12 14:59:17 -0800
committerLinus Torvalds <[email protected]>2015-02-12 18:54:09 -0800
commit49e7e7ff8d551b5b1e2f8da8497b9058cfa25672 (patch)
treeaa671bba976ba7bc0837785a49d5d83c5fc99c98 /tools/perf/scripts/python
parent2acb60a0461fec8a4516686c913a295ce872697f (diff)
fs: shrinker: always scan at least one object of each type
In super_cache_scan() we divide the number of objects of particular type by the total number of objects in order to distribute pressure among As a result, in some corner cases we can get nr_to_scan=0 even if there are some objects to reclaim, e.g. dentries=1, inodes=1, fs_objects=1, nr_to_scan=1/3=0. This is unacceptable for per memcg kmem accounting, because this means that some objects may never get reclaimed after memcg death, preventing it from being freed. This patch therefore assures that super_cache_scan() will scan at least one object of each type if any. [[email protected]: add comment] Signed-off-by: Vladimir Davydov <[email protected]> Cc: Johannes Weiner <[email protected]> Cc: Michal Hocko <[email protected]> Cc: Alexander Viro <[email protected]> Cc: Dave Chinner <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions