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 44C4F6B0047 for ; Tue, 28 Sep 2010 18:55:07 -0400 (EDT) Date: Tue, 28 Sep 2010 15:53:26 -0700 From: Andrew Morton Subject: Re: [patch] arch: remove __GFP_REPEAT for order-0 allocations Message-Id: <20100928155326.9ded5a92.akpm@linux-foundation.org> In-Reply-To: References: <20100928143655.4282a001.akpm@linux-foundation.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org To: David Rientjes Cc: Arnd Bergmann , Richard Henderson , Ivan Kokshaysky , Matt Turner , Russell King , Mikael Starvik , Jesper Nilsson , David Howells , Geert Uytterhoeven , Roman Zippel , Michal Simek , Koichi Yasutake , Kyle McMartin , Helge Deller , Benjamin Herrenschmidt , Paul Mackerras , Martin Schwidefsky , Heiko Carstens , Paul Mundt , "David S. Miller" , Jeff Dike , Ingo Molnar , "H. Peter Anvin" , Thomas Gleixner , linux-arch@vger.kernel.org, linux-mm@kvack.org List-ID: On Tue, 28 Sep 2010 15:47:57 -0700 (PDT) David Rientjes wrote: > On Tue, 28 Sep 2010, Andrew Morton wrote: > > > > Order-0 allocations, including quicklist_alloc(), are always under > > > PAGE_ALLOC_COSTLY_ORDER, so they loop endlessly in the page allocator > > > already without the need for __GFP_REPEAT. > > > > That's only true for the current implementation of the page allocator. > > > > Yes, but in this case it's irrelevant since we're talking about order-0 > allocations. The page allocator will never be changed so that order-0 > allocations immediately fail if there's no available memory, otherwise > we'd only use direct reclaim and the oom killer for high-order allocs or > add __GFP_NOFAIL everywhere and that's quite pointless. The crystal balls are large on this one. > So we can definitely remove __GFP_REPEAT for any order-0 allocation and > it's based on its implementation -- poorly defined as it may be -- and the > inherit design of any sane page allocator that retries such an allocation > if it's going to use reclaim in the first place. Why was __GFP_REPEAT used in those callsites? What were people trying to achieve? We shouldn't just go and ignorantly rip it out without understanding this, and ensuring that we're meeting that intent to the best extent possible. -- 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