From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Fri, 3 Nov 2006 14:12:18 -0800 From: Andrew Morton Subject: Re: Page allocator: Single Zone optimizations Message-Id: <20061103141218.8dbdbd14.akpm@osdl.org> In-Reply-To: References: <20061101182605.GC27386@skynet.ie> <20061101123451.3fd6cfa4.akpm@osdl.org> <454A2CE5.6080003@shadowen.org> <20061103135013.6bdc6240.akpm@osdl.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org Return-Path: To: Christoph Lameter Cc: Mel Gorman , Andy Whitcroft , Nick Piggin , KAMEZAWA Hiroyuki , Linux Memory Management List , Peter Zijlstra List-ID: On Fri, 3 Nov 2006 13:53:55 -0800 (PST) Christoph Lameter wrote: > On Fri, 3 Nov 2006, Andrew Morton wrote: > > > > Kernel pages are buffered already in the slab > > > allocator > > > > But why? I've been intermittently campaigning to stop doing that for about > > five years now. Having private lists of free pages in the slab allocator > > is duplicative of the page allocator's lists and worsens performance. > > This has to do with the constructors and the destructors. They are only > applied during the first allocation or the final deallocation of the slab. > The slab (with the pages) stays on the freelist with all objects having > proper values as set by the constructors. That's possibly useful if the cache has a destructor. If it has a constructor and no destructor then there's no point in locally caching the pages. But destructors are a bad idea: you dirty a cacheline, evict something else and then let the cacheline just sit there and go stale. But I thought that slab once-upon-a-time retained caches of plain old free pages, not in any particular state. Maybe it did and maybe we did remove that. -- 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