aboutsummaryrefslogtreecommitdiffstats
path: root/mm/vmscan.c
diff options
context:
space:
mode:
authorKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>2009-12-14 20:59:13 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-12-15 11:53:18 -0500
commit4f0ddfdffc8bef3a5eb9154734d68a6053194948 (patch)
treeae86c67cbb9290b8f090a13022736c2b862f3630 /mm/vmscan.c
parent7b51755c3b38483b574d363d5ee587283c3f7999 (diff)
vmscan: zone_reclaim() don't use insane swap_cluster_max
In old days, we didn't have sc.nr_to_reclaim and it brought sc.swap_cluster_max misuse. huge sc.swap_cluster_max might makes unnecessary OOM risk and no performance benefit. Now, we can stop its insane thing. Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Reviewed-by: Rik van Riel <riel@redhat.com> Reviewed-by: Minchan Kim <minchan.kim@gmail.com> Cc: Mel Gorman <mel@csn.ul.ie> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/vmscan.c')
-rw-r--r--mm/vmscan.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 63bd521bb229..d55d106ad179 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -2539,8 +2539,7 @@ static int __zone_reclaim(struct zone *zone, gfp_t gfp_mask, unsigned int order)
2539 .may_writepage = !!(zone_reclaim_mode & RECLAIM_WRITE), 2539 .may_writepage = !!(zone_reclaim_mode & RECLAIM_WRITE),
2540 .may_unmap = !!(zone_reclaim_mode & RECLAIM_SWAP), 2540 .may_unmap = !!(zone_reclaim_mode & RECLAIM_SWAP),
2541 .may_swap = 1, 2541 .may_swap = 1,
2542 .swap_cluster_max = max_t(unsigned long, nr_pages, 2542 .swap_cluster_max = SWAP_CLUSTER_MAX,
2543 SWAP_CLUSTER_MAX),
2544 .nr_to_reclaim = max_t(unsigned long, nr_pages, 2543 .nr_to_reclaim = max_t(unsigned long, nr_pages,
2545 SWAP_CLUSTER_MAX), 2544 SWAP_CLUSTER_MAX),
2546 .gfp_mask = gfp_mask, 2545 .gfp_mask = gfp_mask,