From: KOSAKI Motohiro Date: Thu, 12 Mar 2009 21:31:36 +0000 (-0700) Subject: memcg: use correct scan number at reclaim X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f272b7bc447553410dde691aa31fc531adf9c175;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git memcg: use correct scan number at reclaim Even when page reclaim is under mem_cgroup, # of scan page is determined by status of global LRU. Fix that. Signed-off-by: KOSAKI Motohiro Signed-off-by: KAMEZAWA Hiroyuki Cc: Daisuke Nishimura Cc: Balbir Singh Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/vmscan.c b/mm/vmscan.c index 6177e3bcd66b..e89517141657 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -1469,7 +1469,7 @@ static void shrink_zone(int priority, struct zone *zone, int file = is_file_lru(l); int scan; - scan = zone_page_state(zone, NR_LRU_BASE + l); + scan = zone_nr_pages(zone, sc, l); if (priority) { scan >>= priority; scan = (scan * percent[file]) / 100;