aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>2010-08-10 21:03:02 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-08-11 11:59:19 -0400
commitb8f5c5664d51776d74c84228c4b7165abfa92a18 (patch)
tree951e09e1810a356d8ecff7a85637e9c2e2f4e49d
parentf75ca962037ffd639a44fd88933cd9b84c4c4411 (diff)
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 <kosaki.motohiro@jp.fujitsu.com> Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Acked-by: Mel Gorman <mel@csn.ul.ie> Cc: Balbir Singh <balbir@in.ibm.com> Cc: Nishimura Daisuke <d-nishimura@mtf.biglobe.ne.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--mm/vmscan.c1
1 files changed, 1 insertions, 0 deletions
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,
1972 struct zone *zone, int nid) 1972 struct zone *zone, int nid)
1973{ 1973{
1974 struct scan_control sc = { 1974 struct scan_control sc = {
1975 .nr_to_reclaim = SWAP_CLUSTER_MAX,
1975 .may_writepage = !laptop_mode, 1976 .may_writepage = !laptop_mode,
1976 .may_unmap = 1, 1977 .may_unmap = 1,
1977 .may_swap = !noswap, 1978 .may_swap = !noswap,