From mboxrd@z Thu Jan 1 00:00:00 1970 From: Goswin von Brederlow Subject: Re: [00/41] Large Blocksize Support V7 (adds memmap support) Date: Mon, 17 Sep 2007 00:51:06 +0200 Message-ID: <87ps0i442t.fsf@informatik.uni-tuebingen.de> References: <20070911060349.993975297@sgi.com> <200709110452.20363.nickpiggin@yahoo.com.au> <20070911121225.GE13132@lazybastard.org> <20070915014449.4f9cdb51.akpm@linux-foundation.org> <87ir6c3z2l.fsf@informatik.uni-tuebingen.de> <20070915155100.GA21861@v2.random> <87tzpvy9cb.fsf@informatik.uni-tuebingen.de> <20070915223032.GA6708@v2.random> <20070916174657.GA2393@lazybastard.org> <20070916182136.GC2393@lazybastard.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Joern Engel , Andrea Arcangeli , Goswin von Brederlow , Andrew Morton , Nick Piggin , Christoph Lameter , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Christoph Hellwig , Mel Gorman , William Lee Irwin III , David Chinner , Jens Axboe , Badari Pulavarty , Maxim Levitsky , Fengguang Wu , swin wang , totty.lu@gmail.com, hugh@veritas.com To: Linus Torvalds Return-path: Received: from mx1.Informatik.Uni-Tuebingen.De ([134.2.12.5]:49010 "EHLO mx1.informatik.uni-tuebingen.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753511AbXIPWvM (ORCPT ); Sun, 16 Sep 2007 18:51:12 -0400 In-Reply-To: (Linus Torvalds's message of "Sun, 16 Sep 2007 11:44:09 -0700 (PDT)") Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org Linus Torvalds writes: > On Sun, 16 Sep 2007, J=F6rn Engel wrote: >>=20 >> My approach is to have one for mount points and ramfs/tmpfs/sysfs/et= c. >> which are pinned for their entire lifetime and another for regular >> files/inodes. One could take a three-way approach and have >> always-pinned, often-pinned and rarely-pinned. >>=20 >> We won't get never-pinned that way. > > That sounds pretty good. The problem, of course, is that most of the = time,=20 > the actual dentry allocation itself is done before you really know wh= ich=20 > case the dentry will be in, and the natural place for actually giving= the=20 > dentry lifetime hint is *not* at "d_alloc()", but when we "instantiat= e"=20 > it with d_add() or d_instantiate(). > > But it turns out that most of the filesystems we care about already u= se a=20 > special case of "d_add()" that *already* replaces the dentry with ano= ther=20 > one in some cases: "d_splice_alias()". > > So I bet that if we just taught "d_splice_alias()" to look at the ino= de,=20 > and based on the inode just re-allocate the dentry to some other slab= =20 > cache, we'd already handle a lot of the cases! > > And yes, you'd end up with the reallocation overhead quite often, but= at=20 > least it would now happen only when filling in a dentry, not in the=20 > (*much* more critical) cached lookup path. > > Linus You would only get it for dentries that live long (or your prediction is awfully wrong) and then the reallocation amortizes over time if you will. :) MfG Goswin - To unsubscribe from this list: send the line "unsubscribe linux-fsdevel= " in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html