xfs
[Top] [All Lists]

Re: TAKE - reintroduce the nfs inode reference cache

To: Neil Brown <neilb@xxxxxxxxxxxxxxx>
Subject: Re: TAKE - reintroduce the nfs inode reference cache
From: Andi Kleen <ak@xxxxxxx>
Date: Wed, 7 Mar 2001 09:45:17 +0100
Cc: Andi Kleen <ak@xxxxxxx>, Steve Lord <lord@xxxxxxx>, linux-xfs@xxxxxxxxxxx
In-reply-to: <15013.28348.768980.329307@xxxxxxxxxxxxxxxxxxxxxxxx>; from neilb@xxxxxxxxxxxxxxx on Wed, Mar 07, 2001 at 10:11:56AM +1100
References: <ak@xxxxxxx> <200103062056.f26Kuo106999@xxxxxxxxxxxxxxxxxxxx> <20010306222356.A15312@xxxxxxxxxxxxxxxxxxx> <15013.28348.768980.329307@xxxxxxxxxxxxxxxxxxxxxxxx>
Sender: owner-linux-xfs@xxxxxxxxxxx
User-agent: Mutt/1.2.5i
On Wed, Mar 07, 2001 at 10:11:56AM +1100, Neil Brown wrote:
> On Tuesday March 6, ak@xxxxxxx wrote:
> > 
> > I think it would be best to fix nfsd to cache file handles instead of 
> > dentries
> > and only do release when the nfsfh leaves the nfsfh cache.
> > This way could also help ext2, which caches readahead context in struct 
> > file.
> > 
> > Put Neil Brown into cc. Neil, do you see any obstacles with that?
> > 
> > 
> > -Andi
> 
> Firstly, lets check that I understand the situation.

[...]

Main problem is that struct file is not preserved over RPCs. Various
file systems put state into struct file (ext2 readahead context, XFS 
did discard preallocation in f_op->release, which is rather costly).
So I was looking for a way to preserve struct file across multiple RPCs.

[This is somewhat similar to another long standing NFS bug BTW -- 
it shares UDP sockets and there is excessive ARP traffic because the neighbour
state machine times out all the time and does ARP reprobes]


> You could ofcourse do all this inside knfsd, or even inside the
> individual filesystem, but it makes the code a lot more complex.  You
> need to make sure you flush the cache in a timely fashion, and let go
> of denties that have been unlinked and all that stuff.
> If we get the dcache to do the delay, then it is easy as it already
> copes with those other things.

Storing a struct file in the dcache could unfortunately get a bit tricky -
it's not a 1:1 mapping and it would require new fields and new destructors.
I guess it would be easier to put a new cache inbetween similar to what 2.2
nfsd did. 


-Andi

<Prev in Thread] Current Thread [Next in Thread>