From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail203.messagelabs.com (mail203.messagelabs.com [216.82.254.243]) by kanga.kvack.org (Postfix) with SMTP id D5F346B0062 for ; Sun, 1 Nov 2009 10:11:31 -0500 (EST) Date: Mon, 2 Nov 2009 00:11:02 +0900 (JST) From: KOSAKI Motohiro Subject: [PATCHv2 3/5] vmscan: Stop zone_reclaim()'s wrong swap_cluster_max usage In-Reply-To: <20091101234614.F401.A69D9226@jp.fujitsu.com> References: <20091101234614.F401.A69D9226@jp.fujitsu.com> Message-Id: <20091102000951.F407.A69D9226@jp.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org To: LKML Cc: kosaki.motohiro@jp.fujitsu.com, "Rafael J. Wysocki" , Rik van Riel , linux-mm , Andrew Morton , Christoph Lameter , Mel Gorman List-ID: 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 and no performance benefit. Now, we can remove above dangerous one. Signed-off-by: KOSAKI Motohiro --- mm/vmscan.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/mm/vmscan.c b/mm/vmscan.c index 9862c04..e463d48 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -2455,8 +2455,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, -- 1.6.2.5 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org