invalidate_inode_pages() and mmap()

From: Trond Myklebust (trond.myklebust@fys.uio.no)
Date: Fri Apr 28 2000 - 05:25:22 EST


>>>>> " " == Andrea Arcangeli <andrea@suse.de> writes:
> note that when a mapped page-cache is unlinked from the cache
> it doesn't become anonymous, but it's still a shared page or
> private mapping for the process. The only difference will

IMHO the way to fix this is by making invalidate_inode_pages() aware
of file locking. In principle, once we hold a file lock on a range of
pages, we can be confident that we hold at least as much information
about the current state of those pages as the server does. It should
therefore be unnecessary for us to invalidate pages in the specific
area which is covered by the file lock.

There are then 2 problems to worry about:
   1) Races when locking the file: the NLM locking protocol does not
      return any info on the state of the file you just locked.

      We can fix this by putting a call to 'getattr()' in nfs_lock()
      so that we can catch any new cache inconsistencies before the
      call to posix_lock_file() locks out invalidate_inode_pages().

   2) What to do about locks which are not page-aligned? Can the VM
      help us out with pages which are only partly locked?

Cheers,
  Trond

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Apr 30 2000 - 21:00:14 EST