--On Thursday, June 12, 2003 14:44:18 -0700 Andrew Morton [off-list ref]
wrote:
Well it is not "worse". Futzing with i_sem in do_no_page() is pretty
gross. You could add vm_ops->prevalidate() or something if it worries you.
Actually I've been studying the logic. I don't think we need to serialize
with i_sem at all. i_size has already been changed, so just doing a retry
immediately will be safe. Distributed filesystems should also be safe as
long as they mark the page invalid before they call invalidate_mmap_range().
I like your idea of doing an atomic_t instead of a seqlock. The original
idea from Andrea implied there was a range of time it was unstable, but
with this scheme a single increment is sufficient.
I also think if we can solve both the vmtruncate and the distributed file
system races without adding any vm_ops, we should.
Here's a new patch. Does this look better?
Dave
======================================================================
Dave McCracken IBM Linux Base Kernel Team 1-512-838-3059
dmccr@us.ibm.com T/L 678-3059