Re: classzone-VM + mapped pages out of lru_cache

From: Trond Myklebust (trond.myklebust@fys.uio.no)
Date: Thu May 04 2000 - 11:48:38 EST


>>>>> " " == Andrea Arcangeli <andrea@suse.de> writes:

> This untested patch should fix the problem also in 2.2.15 (the
> same way I fixed it in classzone patch):

> --- 2.2.15/mm/filemap.c Thu May 4 13:00:40 2000
> +++ /tmp/filemap.c Thu May 4 17:11:18 2000
> @@ -68,7 +68,7 @@
 
> p = &inode->i_pages; while ((page = *p) != NULL) {
> - if (PageLocked(page)) {
> + if (PageLocked(page) || atomic_read(&page->count) > 1) {
> p = &page->next; continue;
> }

> Trond, what do you think about it?

Not good. If I'm running /bin/bash, and somebody on the server updates
/bin/bash, then I don't want to reboot my machine. With the above
patch, then all new processes will receive a mixture of pages from the
old and the new file until by some accident I manage to clear the
cache of the bad pages.

We have to insist on the PageLocked() both in 2.2.x and 2.3.x because
only pages which are in the process of being read in are safe. If we
know we're scheduled to write out a full page then that would be safe
too, but that is the only such case.

Cheers,
  Trond

PS: It would be nice to have truncate_inode_pages() work in the same
way as it does now: waiting on pages and locking them. This is useful
for reading in the directory pages, since they need to be read in
sequentially (please see the proposed patch I put on l-k earlier
today).

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