From b8f5c5664d51776d74c84228c4b7165abfa92a18 Mon Sep 17 00:00:00 2001 From: KOSAKI Motohiro Date: Tue, 10 Aug 2010 18:03:02 -0700 Subject: 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 --- mm/vmscan.c | 1 + 1 file changed, 1 insertion(+) (limited to 'mm/vmscan.c') 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, -- cgit v1.2.3-58-ga151