From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail138.messagelabs.com (mail138.messagelabs.com [216.82.249.35]) by kanga.kvack.org (Postfix) with ESMTP id 0DD226B005C for ; Wed, 15 Jul 2009 06:44:38 -0400 (EDT) From: Mel Gorman Subject: [PATCH 1/3] page-allocator: Allow too high-order warning messages to be suppressed with __GFP_NOWARN Date: Wed, 15 Jul 2009 12:23:10 +0100 Message-Id: <1247656992-19846-2-git-send-email-mel@csn.ul.ie> In-Reply-To: <1247656992-19846-1-git-send-email-mel@csn.ul.ie> References: <1247656992-19846-1-git-send-email-mel@csn.ul.ie> Sender: owner-linux-mm@kvack.org To: Andrew Morton Cc: Ingo Molnar , linux-kernel@vger.kernel.org, Linux Memory Management List , Heinz Diehl , David Miller , Arnaldo Carvalho de Melo , Mel Gorman List-ID: The page allocator warns once when an order >= MAX_ORDER is specified. This is to catch callers of the allocator that are always falling back to their worst-case when it was not expected. However, there are cases where the caller is behaving correctly but cannot suppress the warning. This patch allows the warning to be suppressed by the callers by specifying __GFP_NOWARN. Signed-off-by: Mel Gorman --- mm/page_alloc.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index caa9268..b469a05 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -1740,8 +1740,10 @@ __alloc_pages_slowpath(gfp_t gfp_mask, unsigned int order, * be using allocators in order of preference for an area that is * too large. */ - if (WARN_ON_ONCE(order >= MAX_ORDER)) + if (order >= MAX_ORDER) { + WARN_ON_ONCE(!(gfp_mask & __GFP_NOWARN)); return NULL; + } /* * GFP_THISNODE (meaning __GFP_THISNODE, __GFP_NORETRY and -- 1.5.6.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