From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?B?SsO2cm4=?= Engel Subject: Re: [00/41] Large Blocksize Support V7 (adds memmap support) Date: Sun, 16 Sep 2007 20:21:37 +0200 Message-ID: <20070916182136.GC2393@lazybastard.org> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: =?utf-8?B?SsO2cm4=?= 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 lazybastard.de ([212.112.238.170]:58637 "EHLO longford.lazybastard.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751527AbXIPSbi (ORCPT ); Sun, 16 Sep 2007 14:31:38 -0400 Content-Disposition: inline In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Sun, 16 September 2007 11:15:36 -0700, Linus Torvalds wrote: > On Sun, 16 Sep 2007, J=C3=B6rn Engel wrote: > >=20 > > I have been toying with the idea of having seperate caches for pinn= ed > > and movable dentries. Downside of such a patch would be the number= of > > memcpy() operations when moving dentries from one cache to the othe= r. >=20 > Totally inappropriate. >=20 > I bet 99% of all "dentry_lookup()" calls involve turning the last den= try=20 > from having a count of zero ("movable") to having a count of 1 ("pinn= ed"). >=20 > So such an approach would fundamentally be broken. It would slow down= all=20 > normal dentry lookups, since the *common* case for leaf dentries is t= hat=20 > they have a zero count. Why am I not surprised? :) > So it's much better to do it on a "directory/file" basis, on the=20 > assumption that files are *mostly* movable (or just freeable). The fa= ct=20 > that they aren't always (ie while kept open etc), is likely statistic= ally=20 > not all that important. My approach is to have one for mount points and ramfs/tmpfs/sysfs/etc. 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. We won't get never-pinned that way. J=C3=B6rn --=20 The wise man seeks everything in himself; the ignorant man tries to get everything from somebody else. -- unknown - 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