Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761392AbZFXQwd (ORCPT ); Wed, 24 Jun 2009 12:52:33 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756075AbZFXQwZ (ORCPT ); Wed, 24 Jun 2009 12:52:25 -0400 Received: from smtp1.linux-foundation.org ([140.211.169.13]:35264 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755428AbZFXQwZ (ORCPT ); Wed, 24 Jun 2009 12:52:25 -0400 Date: Wed, 24 Jun 2009 09:52:17 -0700 (PDT) From: Linus Torvalds X-X-Sender: torvalds@localhost.localdomain To: Andrew Morton cc: Arjan van de Ven , linux-kernel@vger.kernel.org Subject: Re: upcoming kerneloops.org item: get_page_from_freelist In-Reply-To: <20090624094622.d0b0fd82.akpm@linux-foundation.org> Message-ID: References: <20090624080753.4f677847@infradead.org> <20090624094622.d0b0fd82.akpm@linux-foundation.org> User-Agent: Alpine 2.01 (LFD 1184 2008-12-16) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 945 Lines: 26 On Wed, 24 Jun 2009, Andrew Morton wrote: > > Well yes. Using GFP_NOFAIL on a higher-order allocation is bad. Yes, but your definition of "higher order" is incorrect. At the very least, we should change the "order > 0" to "order > 1". As I already mentioned, SLAB uses order-1 allocations in order to not have excessive fragmentation for small kmalloc/slab's that would otherwise waste tons of memory. Think network packets at 1500 bytes each. You can allocate two per page, or five per 2-pages. That's a 25% memory usage difference! And getting an order-1 allocation is simply not that much harder than an order-0 one. It starts getting hard once you get to order-3 or more. Linus -- 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/