Re: [Linux-cachefs] fscache basic question

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

 



Hello Weikuan,

I did not look at the code closely enough to tell how things work now,
but I can comment how I believe they should work. (Any corrections of
my false expectations are very welcome.) My believes are as follows:

> how cachefs could be useful for the type of netfs' that use page 
> cache but not local disk caches.

It cannot. Thought in theory one could very well setup cachefs on a
RAM-based block device, this might make sense only in very special
circumstances when, given a particular file-access pattern, the
cachefs caching strategy happens to be better than the usual
page-cache used for files. (Maybe that due to some kernel
optimizations this 'competition' even does not happen?)

> a) if the page in the cachefs is still valid (up-to-date), would it 
> still be in the page-cache? If so, reading from cachefs would not be 
> efficient then.

Maybe it is in the page-cache, maybe not. If yes, it is used (I hope).

> b) Is it possible that the page is already evicted from pagecache, but 
> it is still in the cachefs?

Yes, for example after client's reboot.

> when trying to read from pagecache or cachefs, is it 
> guaranteed that the cached file page is not out-of-date w.r.t the copy 
> at the server side.

I believe it is guaranteed to the same level as NFS itself can
guarantee this. Some metadata have to be got from the server to
achieve this.

> I might have just asked some naive questions. Please bear with me. But 
> they puzzle me quite a bit.

I added my believes about the design goals. I guess more people could
share these believes with me, so it is worth correcting them if they
are wrong.

Regards

Vaclav


[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]
  Powered by Linux