lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.0.999.0709161128350.16478@woody.linux-foundation.org>
Date:	Sun, 16 Sep 2007 11:44:09 -0700 (PDT)
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	Jörn Engel <joern@...fs.org>
cc:	Andrea Arcangeli <andrea@...e.de>,
	Goswin von Brederlow <brederlo@...ormatik.uni-tuebingen.de>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Nick Piggin <nickpiggin@...oo.com.au>,
	Christoph Lameter <clameter@....com>,
	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
	Christoph Hellwig <hch@....de>, Mel Gorman <mel@...net.ie>,
	William Lee Irwin III <wli@...omorphy.com>,
	David Chinner <dgc@....com>,
	Jens Axboe <jens.axboe@...cle.com>,
	Badari Pulavarty <pbadari@...il.com>,
	Maxim Levitsky <maximlevitsky@...il.com>,
	Fengguang Wu <fengguang.wu@...il.com>,
	swin wang <wangswin@...il.com>, totty.lu@...il.com,
	hugh@...itas.com
Subject: Re: [00/41] Large Blocksize Support V7 (adds memmap support)



On Sun, 16 Sep 2007, Jörn Engel wrote:
> 
> 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.

That sounds pretty good. The problem, of course, is that most of the time, 
the actual dentry allocation itself is done before you really know which 
case the dentry will be in, and the natural place for actually giving the 
dentry lifetime hint is *not* at "d_alloc()", but when we "instantiate" 
it with d_add() or d_instantiate().

But it turns out that most of the filesystems we care about already use a 
special case of "d_add()" that *already* replaces the dentry with another 
one in some cases: "d_splice_alias()".

So I bet that if we just taught "d_splice_alias()" to look at the inode, 
and based on the inode just re-allocate the dentry to some other slab 
cache, we'd already handle a lot of the cases!

And yes, you'd end up with the reallocation overhead quite often, but at 
least it would now happen only when filling in a dentry, not in the 
(*much* more critical) cached lookup path.

			Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ