[OpenAFS-devel] funny lookup/dnlc/dcache/...

Jeffrey Hutzelman jhutz@cmu.edu
Wed, 20 Apr 2005 10:43:09 -0400


On Tuesday, April 19, 2005 10:11:32 PM -0400 "John S. Bucy" 
<bucy-openafs-devel@gloop.org> wrote:

> On Tue, Apr 19, 2005 at 01:50:43PM -0400, John S. Bucy wrote:
>
>> It seems like all of the lookups should hit in Linux's dentry cache --
>> they seem to for ext3 -- but AFS is doing a lot of extra work
>> somewhere.  Like many of them are missing and its falling back to
>> afs_dir_Lookup().
>
> I understand now ... the vfs is doing
> d_op->d_revalidate = afs_linux_revalidate_dentry(), it falls through the
> dnlc and does an afs_lookup().  It seems like the revalidate routine
> should be able to know whether or not the dir vnode has changed since
> the dentry was last validated and only do the lookup in that case.
>
> I notice that struct dentry has a void *d_fsdata that AFS isn't using
> right now that might be used to track, say, the data version of the
> dir vnode.

Without actually reading the code in question, that would seem to be a 
valid approach.  In fact, I'm a little surprised we're not doing something 
along those lines already.  Care to send a patch?

-- Jeff