From: KOSAKI Motohiro Date: Tue, 15 Dec 2009 01:59:13 +0000 (-0800) Subject: vmscan: zone_reclaim() don't use insane swap_cluster_max X-Git-Tag: upstream/snapshot3+hdmi~16275 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4f0ddfdffc8bef3a5eb9154734d68a6053194948;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git 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 Reviewed-by: Rik van Riel Reviewed-by: Minchan Kim Cc: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/vmscan.c b/mm/vmscan.c index 63bd521..d55d106 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) .may_writepage = !!(zone_reclaim_mode & RECLAIM_WRITE), .may_unmap = !!(zone_reclaim_mode & RECLAIM_SWAP), .may_swap = 1, - .swap_cluster_max = max_t(unsigned long, nr_pages, - SWAP_CLUSTER_MAX), + .swap_cluster_max = SWAP_CLUSTER_MAX, .nr_to_reclaim = max_t(unsigned long, nr_pages, SWAP_CLUSTER_MAX), .gfp_mask = gfp_mask,