From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1762436AbXKHTDm (ORCPT ); Thu, 8 Nov 2007 14:03:42 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1760839AbXKHTDa (ORCPT ); Thu, 8 Nov 2007 14:03:30 -0500 Received: from netops-testserver-3-out.sgi.com ([192.48.171.28]:44465 "EHLO relay.sgi.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1760340AbXKHTD3 (ORCPT ); Thu, 8 Nov 2007 14:03:29 -0500 Date: Thu, 8 Nov 2007 11:03:29 -0800 (PST) From: Christoph Lameter X-X-Sender: clameter@schroedinger.engr.sgi.com To: Mel Gorman cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [patch 20/23] dentries: Add constructor In-Reply-To: <20071108152324.GF2591@skynet.ie> Message-ID: References: <20071107011130.382244340@sgi.com> <20071107011231.453090374@sgi.com> <20071108152324.GF2591@skynet.ie> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 8 Nov 2007, Mel Gorman wrote: > > Signed-off-by: Christoph Lameter > > Seems to be some garbling on there in the signed-off lines. Yes that needs to be fixed. > > +void dcache_ctor(struct kmem_cache *s, void *p) > > +{ > > + struct dentry *dentry = p; > > + > > + spin_lock_init(&dentry->d_lock); > > + dentry->d_inode = NULL; > > + INIT_LIST_HEAD(&dentry->d_lru); > > + INIT_LIST_HEAD(&dentry->d_alias); > > +} > > + > > Is there any noticable overhead to the constructor? Its a minor performance win since we can avoid reinitializing these values and zeroing the object on alloc if there are already allocated objects.