Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756367AbZJVOXy (ORCPT ); Thu, 22 Oct 2009 10:23:54 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756331AbZJVOXx (ORCPT ); Thu, 22 Oct 2009 10:23:53 -0400 Received: from gir.skynet.ie ([193.1.99.77]:50116 "EHLO gir.skynet.ie" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755989AbZJVOWj (ORCPT ); Thu, 22 Oct 2009 10:22:39 -0400 From: Mel Gorman To: Frans Pop , Jiri Kosina , Sven Geggus , Karol Lewandowski , Tobias Oetiker Cc: "Rafael J. Wysocki" , David Miller , Reinette Chatre , Kalle Valo , David Rientjes , KOSAKI Motohiro , Mohamed Abbas , Jens Axboe , "John W. Linville" , Pekka Enberg , Bartlomiej Zolnierkiewicz , Greg Kroah-Hartman , Stephan von Krawczynski , Kernel Testers List , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, "linux-mm@kvack.org\"" , Mel Gorman Subject: [PATCH 3/5] vmscan: Force kswapd to take notice faster when high-order watermarks are being hit Date: Thu, 22 Oct 2009 15:22:34 +0100 Message-Id: <1256221356-26049-4-git-send-email-mel@csn.ul.ie> X-Mailer: git-send-email 1.6.3.3 In-Reply-To: <1256221356-26049-1-git-send-email-mel@csn.ul.ie> References: <1256221356-26049-1-git-send-email-mel@csn.ul.ie> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1294 Lines: 40 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..cd68109 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -2016,6 +2016,15 @@ loop_again: priority != DEF_PRIORITY) continue; + /* + * Exit quickly to restart if it has been indicated + * 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 from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/