FS-Cache, NFS and page bits

Trond Myklebust trond.myklebust at fys.uio.no
Fri Dec 8 12:17:30 EST 2006


On Fri, 2006-12-08 at 12:11 -0500, Trond Myklebust wrote:
> On Fri, 2006-12-08 at 16:49 +0000, David Howells wrote:
> > Hi Trond, Linus,
> > 
> > I've just updated my FS-Cache tree to the latest Linus head - or at least
> > I tried to.
> > 
> > I was using a bit in page->private to indicate that a page was cached and might
> > be holding cache resources.  I was previously using PG_private, but Trond
> > claimed that for his own.  I moved my Trond's PG_private and my bit into
> > page->private and used PG_private to indicate that one of these bits was set.
> > However, Trond has now claimed page->private for something else too, and I
> > appear to have run out of bits.
> 
> Why is it a problem? AFAIR you were supposed to be disabling cachefs on
> files that are open for write. NFS only uses PagePrivate and
> page->private for pages which are under writeback.

BTW: Our use of page->private is purely an optimisation: we store a
pointer to the nfs_page, which describes the area on the page that is
needed for writeback. We could always revert to looking up the nfs_page
in the nfs_inode's radix tree: that would just be a 1 line change in
nfs_page_find_request_locked(). Much slower, though...

Trond



More information about the NFSv4 mailing list