>>>>> " " == Linus Torvalds <[EMAIL PROTECTED]> writes:

     > How about adding a test in invalidate_inode_pages() like

     >          /* We cannot invalidate a locked page */ if
     >          (TryLockPage(page))
     >                  continue;

     > + /* We cannot invalidate a page that is in use */
     > + if (page_count(page) != 1) {
     > + UnlockPage(page);
     > + continue;
     > + }
     > +
     >          __lru_cache_del(page); __remove_inode_page(page);

     > Because otherwise we might end up invalidating pages that might
     > have pending write-back etc (although I think the NFS logic
     > tries to avoid invalidating when there's pending activity).

You may remember that I've been fighting a rearguard action against
this for some time.

Under NFS the problem is that pages can (and *should*) be invalidated
despite there being pending write backs. The server can trigger the
need for a cache invalidation at any time.
The existence of file locks that aren't page aligned, as well as
partial page writeback ensure that we cannot make the equivalence
   page has pending write == page is correct.

Cheers,
  Trond
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/

Reply via email to