]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
mm: workingset: fix premature shadow node shrinking with cgroups
authorJohannes Weiner <hannes@cmpxchg.org>
Fri, 31 Mar 2017 22:11:52 +0000 (15:11 -0700)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 21 Apr 2017 08:11:47 +0000 (10:11 +0200)
commit9c0ab3831483838f2450fa7487dc0ede123e54f3
treecb4a2d5e6a34ddc04b66b3a8bf23e462a47b3d5f
parentfac9b95a2b000336eca46ee2d195a936ad88e991
mm: workingset: fix premature shadow node shrinking with cgroups

BugLink: http://bugs.launchpad.net/bugs/1681875
commit 0cefabdaf757a6455d75f00cb76874e62703ed18 upstream.

Commit 0a6b76dd23fa ("mm: workingset: make shadow node shrinker memcg
aware") enabled cgroup-awareness in the shadow node shrinker, but forgot
to also enable cgroup-awareness in the list_lru the shadow nodes sit on.

Consequently, all shadow nodes are sitting on a global (per-NUMA node)
list, while the shrinker applies the limits according to the amount of
cache in the cgroup its shrinking.  The result is excessive pressure on
the shadow nodes from cgroups that have very little cache.

Enable memcg-mode on the shadow node LRUs, such that per-cgroup limits
are applied to per-cgroup lists.

Fixes: 0a6b76dd23fa ("mm: workingset: make shadow node shrinker memcg aware")
Link: http://lkml.kernel.org/r/20170322005320.8165-1-hannes@cmpxchg.org
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: Vladimir Davydov <vdavydov@tarantool.org>
Cc: Michal Hocko <mhocko@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
mm/workingset.c