Re: [00/41] Large Blocksize Support V7 (adds memmap support)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 16 September 2007 11:15:36 -0700, Linus Torvalds wrote:
> On Sun, 16 Sep 2007, Jörn Engel wrote:
> > 
> > I have been toying with the idea of having seperate caches for pinned
> > and movable dentries.  Downside of such a patch would be the number of
> > memcpy() operations when moving dentries from one cache to the other.
> 
> Totally inappropriate.
> 
> I bet 99% of all "dentry_lookup()" calls involve turning the last dentry 
> from having a count of zero ("movable") to having a count of 1 ("pinned").
> 
> So such an approach would fundamentally be broken. It would slow down all 
> normal dentry lookups, since the *common* case for leaf dentries is that 
> 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 
> assumption that files are *mostly* movable (or just freeable). The fact 
> that they aren't always (ie while kept open etc), is likely statistically 
> 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örn

-- 
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@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux