From: KOSAKI Motohiro Date: Wed, 11 Aug 2010 01:03:02 +0000 (-0700) Subject: memcg: sc.nr_to_reclaim should be initialized X-Git-Tag: firefly_0821_release~9833^2~880 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=b8f5c5664d51776d74c84228c4b7165abfa92a18;p=firefly-linux-kernel-4.4.55.git memcg: sc.nr_to_reclaim should be initialized Currently, mem_cgroup_shrink_node_zone() initialize sc.nr_to_reclaim as 0. It mean shrink_zone() only scan 32 pages and immediately return even if it doesn't reclaim any pages. This patch fixes it. Signed-off-by: KOSAKI Motohiro Acked-by: KAMEZAWA Hiroyuki Acked-by: Mel Gorman Cc: Balbir Singh Cc: Nishimura Daisuke Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/vmscan.c b/mm/vmscan.c index ec5ddccbf82e..4e684449bf40 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -1972,6 +1972,7 @@ unsigned long mem_cgroup_shrink_node_zone(struct mem_cgroup *mem, struct zone *zone, int nid) { struct scan_control sc = { + .nr_to_reclaim = SWAP_CLUSTER_MAX, .may_writepage = !laptop_mode, .may_unmap = 1, .may_swap = !noswap,