From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Morton Subject: Re: [PATCH] Properly init address_space->writeback_index Date: Thu, 14 Aug 2008 12:55:10 -0700 Message-ID: <20080814125510.8a2d1faf.akpm@linux-foundation.org> References: <1218737620.15342.386.camel@think.oraclecorp.com> <20080814120533.2c8a8da3.akpm@linux-foundation.org> <1218742533.15342.409.camel@think.oraclecorp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: linux-fsdevel@vger.kernel.org To: Chris Mason Return-path: Received: from smtp1.linux-foundation.org ([140.211.169.13]:59038 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760610AbYHNTzv (ORCPT ); Thu, 14 Aug 2008 15:55:51 -0400 In-Reply-To: <1218742533.15342.409.camel@think.oraclecorp.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Thu, 14 Aug 2008 15:35:33 -0400 Chris Mason wrote: > > > > Note that this assumes that a filesystem which implements > > ->alloc_inode() will call inode_init_once() within its ->alloc_inode(). > > > > Which means, I think, that we can just remove inode_init_once() > > altogether and move its initialisations into alloc_inode() along with > > all the existing ones. > > > > What do you think? > > > > There's the silent breakage of out of tree FS, We could leave void inode_init_once(struct inode *inode) { WARN_ON_ONCE(1); } EXPORT_SYMBOL(inode_init_once); in place for a while. > but, your patch seems > much cleaner to me. It has the downside that we'll need to reinitialise all those list_heads on each inode allocation, whereas currently that only happens at slab-page-allocation time. Trade that off against all the open-coded zeroings which got removed then it's probably a wash from a performance POV. Or not. A memset followed by a sprinkle of random writes might be faster than no-memset followed by a sprinkle of random writes. Or not ;)