From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail202.messagelabs.com (mail202.messagelabs.com [216.82.254.227]) by kanga.kvack.org (Postfix) with ESMTP id E1EDA6B00A5 for ; Tue, 17 Feb 2009 13:10:28 -0500 (EST) Date: Tue, 17 Feb 2009 19:11:57 +0100 From: Johannes Weiner Subject: Re: [patch] SLQB slab allocator (try 2) Message-ID: <20090217181157.GA2158@cmpxchg.org> References: <20090123154653.GA14517@wotan.suse.de> <200902041748.41801.nickpiggin@yahoo.com.au> <20090204152709.GA4799@csn.ul.ie> <200902051459.30064.nickpiggin@yahoo.com.au> <20090216184200.GA31264@csn.ul.ie> <4999BBE6.2080003@cs.helsinki.fi> <1234890096.11511.6.camel@penberg-laptop> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: owner-linux-mm@kvack.org To: Christoph Lameter Cc: Pekka Enberg , Mel Gorman , Nick Piggin , Nick Piggin , Linux Memory Management List , Linux Kernel Mailing List , Andrew Morton , Lin Ming , "Zhang, Yanmin" List-ID: On Tue, Feb 17, 2009 at 12:05:07PM -0500, Christoph Lameter wrote: > Well yes you missed two locations (kmalloc_caches array has to be > redimensioned) and I also was writing the same patch... > > Here is mine: > > Subject: SLUB: Do not pass 8k objects through to the page allocator > > Increase the maximum object size in SLUB so that 8k objects are not > passed through to the page allocator anymore. The network stack uses 8k > objects for performance critical operations. > > Signed-off-by: Christoph Lameter > > Index: linux-2.6/include/linux/slub_def.h > =================================================================== > --- linux-2.6.orig/include/linux/slub_def.h 2009-02-17 10:45:51.000000000 -0600 > +++ linux-2.6/include/linux/slub_def.h 2009-02-17 11:06:53.000000000 -0600 > @@ -121,10 +121,21 @@ > #define KMALLOC_SHIFT_LOW ilog2(KMALLOC_MIN_SIZE) > > /* > + * Maximum kmalloc object size handled by SLUB. Larger object allocations > + * are passed through to the page allocator. The page allocator "fastpath" > + * is relatively slow so we need this value sufficiently high so that > + * performance critical objects are allocated through the SLUB fastpath. > + * > + * This should be dropped to PAGE_SIZE / 2 once the page allocator > + * "fastpath" becomes competitive with the slab allocator fastpaths. > + */ > +#define SLUB_MAX_SIZE (2 * PAGE_SIZE) This relies on PAGE_SIZE being 4k. If you want 8k, why don't you say so? Pekka did this explicitely. Hannes -- 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