summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJerome Marchand <jmarchan@redhat.com>2014-08-06 16:08:03 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-01-29 17:40:52 -0800
commit299040331834e81a720acb85be2acfdf85a32b56 (patch)
tree40c8be2ad87ce43c6013af00bdf1ad87dbe73c16 /include
parentcbc42af9f6d80d270ce02c6f5daf21afed3fcb71 (diff)
downloadlwn-299040331834e81a720acb85be2acfdf85a32b56.tar.gz
lwn-299040331834e81a720acb85be2acfdf85a32b56.zip
memcg, vmscan: Fix forced scan of anonymous pages
commit 2ab051e11bfa3cbb7b24177f3d6aaed10a0d743e upstream. 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. [hannes@cmpxchg.org: cleanups] Signed-off-by: Jerome Marchand <jmarchan@redhat.com> Acked-by: Michal Hocko <mhocko@suse.cz> Acked-by: Johannes Weiner <hannes@cmpxchg.org> Reviewed-by: Rik van Riel <riel@redhat.com> Cc: Mel Gorman <mgorman@suse.de> Signed-off-by: Johannes Weiner <hannes@cmpxchg.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Mel Gorman <mgorman@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions