Re: [RFC][PATCH] Rename PageChecked as PageMiscFS

David Howells
2005-08-11T09:42:27Z

Trond Myklebust <trond.myklebust@fys.uio.no> wrote:

> > http://marc.theaimsgroup.com/?l=linux-kernel&m=112368417412580&w=2
>
> Oh. You are talking about CacheFS? That hasn't been declared "ready to
> merge" yet.

I can probably put out FS-Cache now, and the patches for kAFS and NFS to use
it. CacheFS is taking a little longer than expected because I'm having to be
so careful about ENOMEM handling.

> That said, is it really safe to use any flags other than
> PG_lock/PG_writeback there, David?

If I use PG_locked, that hurts performance horribly as readpage() can't then
unlock the page until the page has been read from the network _and_ has been
written to the cache, two operations which _must_ of necessity be sequential.

I can't use PG_writeback to cover the write to the cache as that has indicates
write completion to the network. Writes to the cache and the network may run
in parallel, and so you need two flags to keep track of the completion state
of both.

> I can't see that you want to allow other tasks to modify or free the page
> while you are writing it to the local cache.

I don't. Hence the use of a combination of the PG_fs_misc bit and the
page_mkwrite() VMA op.

The page release address space op also waits for the PG_fs_misc bit.

David