Re: invalidate_inode_pages in 2.5.32/3

Daniel Phillips
2002-09-10T20:54:54Z

On Tuesday 10 September 2002 21:04, Chuck Lever wrote:
> today, dirty mmap'd pages are passed to the NFS client via the writepage
> address space operation. what more needs to be done here? is there a
> mechanism today to tell the VM layer to "call writepage for all dirty
> mmap'd pages?"

Well, Andrew has cooked up something that seems to be headed in that
direction, mpage_writepages and various associated superstructure, but
it does not apparently walk all the ptes to check the dirty bits before
it flushes the dirty pages, which is what you want, I think. It would
not be hard to teach it that trick, it's another thing made easy by
rmap.

Then, after that's done, what kind of semantics have we got? Perhaps
it's worth being able to guarantee that when a program says 'get all
the dirty memory here out onto disk' it actually happens, even though
there is no built-in way to be sure that some unsychronized task
won't come along and dirty the mmap again immediately. You could look
at the need for synchronization there as an application issue. On the
other hand, if the NFS client is taking the liberty of flushing the
dirty memory on behalf of the mmap users, what guarantee is provided?
IMHO, none, so is this really worth it for the NFS client to do this?

It does make sense that fsync should really get all the dirty pages
onto disk (err, or onto the server) and not come back until its done,
and that 'dirty pages' should include dirty ptes, not just pages that
happen to have been scanned and had their dirty bits moved from the
pte to the struct page.

Andrew, did I miss something, or does the current code really ignore
the pte dirty bits?

--
Daniel