diff options
author | Jerome Marchand <[email protected]> | 2014-08-06 16:08:03 -0700 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2014-08-06 18:01:22 -0700 |
commit | 2ab051e11bfa3cbb7b24177f3d6aaed10a0d743e (patch) | |
tree | 5262105b4933396587db86a36cbd28d5db37ceac /tools/perf/scripts/python/netdev-times.py | |
parent | 7c0db9e917f77e6de2a524b33b5436491850dc79 (diff) |
memcg, vmscan: Fix forced scan of anonymous pages
When memory cgoups are enabled, the code that decides to force to scan
anonymous pages in get_scan_count() compares global values (free,
high_watermark) to a value that is restricted to a memory cgroup (file).
It make the code over-eager to force anon scan.
For instance, it will force anon scan when scanning a memcg that is
mainly populated by anonymous page, even when there is plenty of file
pages to get rid of in others memcgs, even when swappiness == 0. It
breaks user's expectation about swappiness and hurts performance.
This patch makes sure that forced anon scan only happens when there not
enough file pages for the all zone, not just in one random memcg.
[[email protected]: cleanups]
Signed-off-by: Jerome Marchand <[email protected]>
Acked-by: Michal Hocko <[email protected]>
Acked-by: Johannes Weiner <[email protected]>
Reviewed-by: Rik van Riel <[email protected]>
Cc: Mel Gorman <[email protected]>
Signed-off-by: Johannes Weiner <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/netdev-times.py')
0 files changed, 0 insertions, 0 deletions