Re: PATCH: rewrite of invalidate_inode_pages

From: Trond Myklebust (trond.myklebust@fys.uio.no)
Date: Thu May 11 2000 - 17:56:45 EST


>>>>> " " == Juan J Quintela <quintela@fi.udc.es> writes:

> (I have removed the locking to clarify the example). It can be
> that I am not understanding something obvious, but I think that
> the old code also invalidates oll the pages.

No it doesn't. If there are locked pages it skips them. In the end we
should find ourselves with a ring of locked pages, so we're doing the
equivalent of the loop

  while (head != curr) {
      curr = curr->next;
      if (PageLocked(page))
            continue;
      .... This code is no longer called 'cos all pages are locked .....
  }

> new one, liberates all the non_locked pages and then sleeps
> waiting one page to become unlocked. the other version when

This is wrong. The reason is that under NFS, the rpciod can call
invalidate_inode_pages(). If it sleeps on a locked page, then it means
we must have some page IO in progress on that page. Who serves page IO
under NFS? rpciod.
So we deadlock...

As I said. The whole idea behind invalidate_inode_pages() is to serve
the need of NFS (and any future filesystems) for non-blocking
invalidation of the page cache.

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 : Mon May 15 2000 - 21:00:19 EST