From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail191.messagelabs.com (mail191.messagelabs.com [216.82.242.19]) by kanga.kvack.org (Postfix) with SMTP id 58A766B01AC for ; Thu, 17 Jun 2010 09:46:54 -0400 (EDT) Date: Thu, 17 Jun 2010 08:43:33 -0500 (CDT) From: Christoph Lameter Subject: Re: [RFC] slub: Simplify boot kmem_cache_cpu allocations In-Reply-To: <4C19E19D.2020802@kernel.org> Message-ID: References: <4C189119.5050801@kernel.org> <4C190748.7030400@kernel.org> <4C19E19D.2020802@kernel.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mm@kvack.org To: Tejun Heo Cc: Pekka Enberg , David Rientjes , linux-mm@kvack.org List-ID: On Thu, 17 Jun 2010, Tejun Heo wrote: > On 06/16/2010 07:35 PM, Christoph Lameter wrote: > >> It's primarily controlled by PERCPU_DYNAMIC_RESERVE. I don't think > >> there will be any systematic way to do it other than sizing it > >> sufficiently. Can you calculate the upper bound? The constant has > >> been used primarily for optimization so how it's used needs to be > >> audited if we wanna guarantee free space in the first chunk but I > >> don't think it would be too difficult. > > > > The upper bound is SLUB_PAGE_SHIFT * sizeof(struct kmem_cache_cpu). > > > > Thats usually 14 * 104 bytes = 1456 bytes. This may increase to more > > than 8k given the future plans to add queues into kmem_cache_cpu. > > Alright, will work on that. Does slab allocator guarantee to return > NULL if called before initialized or is it undefined? If latter, is > there a way to determine whether slab is initialized yet? Behavior is undefined. slab_is_available() determines if slab is up yet. -- 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