From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail190.messagelabs.com (mail190.messagelabs.com [216.82.249.51]) by kanga.kvack.org (Postfix) with ESMTP id 3687B6B0044 for ; Tue, 27 Oct 2009 09:40:45 -0400 (EDT) From: Mel Gorman Subject: [PATCH 3/3] vmscan: Force kswapd to take notice faster when high-order watermarks are being hit Date: Tue, 27 Oct 2009 13:40:33 +0000 Message-Id: <1256650833-15516-4-git-send-email-mel@csn.ul.ie> In-Reply-To: <1256650833-15516-1-git-send-email-mel@csn.ul.ie> References: <1256650833-15516-1-git-send-email-mel@csn.ul.ie> Sender: owner-linux-mm@kvack.org To: Andrew Morton , stable@kernel.org Cc: linux-kernel@vger.kernel.org, "linux-mm@kvack.org\"" , Frans Pop , Jiri Kosina , Sven Geggus , Karol Lewandowski , Tobias Oetiker , KOSAKI Motohiro , Pekka Enberg , Rik van Riel , Christoph Lameter , Stephan von Krawczynski , "Rafael J. Wysocki" , Kernel Testers List , Mel Gorman List-ID: When a high-order allocation fails, kswapd is kicked so that it reclaims at a higher-order to avoid direct reclaimers stall and to help GFP_ATOMIC allocations. Something has changed in recent kernels that affect the timing where high-order GFP_ATOMIC allocations are now failing with more frequency, particularly under pressure. This patch forces kswapd to notice sooner that high-order allocations are occuring. Signed-off-by: Mel Gorman --- mm/vmscan.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/mm/vmscan.c b/mm/vmscan.c index 64e4388..7eceb02 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -2016,6 +2016,15 @@ loop_again: priority != DEF_PRIORITY) continue; + /* + * Exit the function now and have kswapd start over + * if it is known that higher orders are required + */ + if (pgdat->kswapd_max_order > order) { + all_zones_ok = 1; + goto out; + } + if (!zone_watermark_ok(zone, order, high_wmark_pages(zone), end_zone, 0)) all_zones_ok = 0; -- 1.6.3.3 -- 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