Commit 360d414f authored by Balbir Singh's avatar Balbir Singh Committed by James Toy

Fix an incorrect condition in memcg lru manipulation

The PageAcctLRU bit itself does not mean a lot without checking
if the mem cgroup is the same as the root cgroup. This patch
fixes a left over from the previous versions.
Reported-by: default avatarKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Cc: Li Zefan <lizf@cn.fujitsu.com>
Cc: Paul Menage <menage@google.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 2aee4cab
...@@ -414,7 +414,7 @@ void mem_cgroup_rotate_lru_list(struct page *page, enum lru_list lru) ...@@ -414,7 +414,7 @@ void mem_cgroup_rotate_lru_list(struct page *page, enum lru_list lru)
*/ */
smp_rmb(); smp_rmb();
/* unused or root page is not rotated. */ /* unused or root page is not rotated. */
if (!PageCgroupUsed(pc) || PageCgroupAcctLRU(pc)) if (!PageCgroupUsed(pc) || mem_cgroup_is_root(pc->mem_cgroup))
return; return;
mz = page_cgroup_zoneinfo(pc); mz = page_cgroup_zoneinfo(pc);
list_move(&pc->lru, &mz->lists[lru]); list_move(&pc->lru, &mz->lists[lru]);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment