Commit f272b7bc authored by KOSAKI Motohiro's avatar KOSAKI Motohiro Committed by Linus Torvalds

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: default avatarKOSAKI Motohiro <>
Signed-off-by: default avatarKAMEZAWA Hiroyuki <>
Cc: Daisuke Nishimura <>
Cc: Balbir Singh <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 02d46e07
......@@ -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;
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