Thread (1 message) 1 message, 1 author, 2014-02-16

Re: [PATCH 02/11] vfs: More precise tests in d_invalidate

From: Eric W. Biederman <hidden>
Date: 2014-02-16 01:22:54
Also in: lkml

Linus Torvalds [off-list ref] writes:
On Sat, Feb 15, 2014 at 3:23 PM, Eric W. Biederman
[off-list ref] wrote:
quoted
Except that today d_invalidate drops the dcache lock and
calls shrink_dcache_parent.  Which gets you into exactly the same
complex "walk parents and check all siblings" code.
Hmm. It only does that for directories that have sub-entries, though.

I think you may care just about directories (because that's what your
series is about), but d_invalidate() is used for other cases too,
notably d_revalidate() (ie things like stale NFS lookups of normal
files).

That said, I'll have to think about this more. If d_subdir is empty, I
guess d_walk() will be fairly cheap. It's very different, but maybe
not as disastrous as I thought.
Thank you for taking the time to look.

It is also very true that I have been mostly focusing on the semantics
and correctness rather than on the performance of these changes.

I did keep a weather eye on the performance impact of these changes
though and as long as we can stand a slow down in the rare case where
mount points are present my changes should be fine.

Eric
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help