lkml.org 
[lkml]   [1999]   [Nov]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 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/

\
 
 \ /
  Last update: 2005-03-22 13:54    [W:0.016 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site