From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933439AbXCWHJF (ORCPT ); Fri, 23 Mar 2007 03:09:05 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S933900AbXCWHJF (ORCPT ); Fri, 23 Mar 2007 03:09:05 -0400 Received: from courier.cs.helsinki.fi ([128.214.9.1]:54061 "EHLO mail.cs.helsinki.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933942AbXCWHJD (ORCPT ); Fri, 23 Mar 2007 03:09:03 -0400 Date: Fri, 23 Mar 2007 09:09:00 +0200 (EET) From: Pekka J Enberg To: Eric Dumazet cc: akpm@osdl.org, linux-kernel@vger.kernel.org, apw@shadowen.org, hch@lst.de, manfred@colorfullife.com, christoph@lameter.com, pj@sgi.com Subject: Re: [PATCH] slab: NUMA kmem_cache diet In-Reply-To: <4603047C.4070904@cosmosbay.com> Message-ID: References: <4603047C.4070904@cosmosbay.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org (Please inline patches to the mail, makes it easier to review.) On Thu, 22 Mar 2007, Eric Dumazet wrote: > Some NUMA machines have a big MAX_NUMNODES (possibly 1024), but fewer possible > nodes. This patch dynamically sizes the 'struct kmem_cache' to allocate only > needed space. > > I moved nodelists[] field at the end of struct kmem_cache, and use the > following computation in kmem_cache_init() Hmm, what seems bit worrying is: diff --git a/mm/slab.c b/mm/slab.c index abf46ae..b187618 100644 --- a/mm/slab.c +++ b/mm/slab.c @@ -389,7 +389,6 @@ struct kmem_cache { unsigned int buffer_size; u32 reciprocal_buffer_size; /* 3) touched by every alloc & free from the backend */ - struct kmem_list3 *nodelists[MAX_NUMNODES]; I think nodelists is placed at the beginning of the struct for a reason. But I have no idea if it actually makes any difference... Pekka