Messages in this thread | | | Date | Tue, 2 Nov 1999 14:24:12 -0800 (PST) | From | (V. Ganesh) | Subject | Re: Buffer and page cache |
| |
> > exactly where would you bump up the page count ? in write() ? > > what if there were several writes to the same page ? we can't keep bumping > > it up. of course we could abuse the page count by setting a high bit, but > > that's ugly. > > That's why one writepage is called with the page locked. > > -ben
we're talking about two different things. I think you're talking about simultaneous writes, which are serialized by the page lock. that's OK.
the refcount of a page in the pagecache, clean or dirty is 1 (when it's not being currently read/written and not mapped by any process). shrink_mmap can recycle it if it's clean. the problem is with the way shrink_mmap checks if the page is dirty - it checks if any of page->buffers is busy. if page->buffers is NULL, it just assumes the page is clean and recycles it.
stephen suggested bumping up the refcount to avoid this problem, but I don't quite see where this can be done.
ganesh
- 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/
| |