lkml.org 
[lkml]   [1999]   [Jul]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: clustering page-ins
On Mon, 26 Jul 1999, Stephen C. Tweedie wrote:
> On Sun, 25 Jul 1999 14:04:13 -0400 (EDT), Chuck Lever <cel@monkey.org>
> said:
> > i'm thinking a better way to do this might be to clear the page reference
> > bit behind the actual faulting page, but only as long as we're scheduling
> > read-ahead I/Os. in other words, save metadata about the previously read
> > ahead data so that those pages can be marked as unreferenced once we know
> > it's OK to continue reading ahead.
>
> For mmap() you need to be really careful about when you unreference the
> pages. A _lot_ of applications access data in a "tiled" manner, where
> there is a lot of access to a large window of the memory at once but the
> window moves up through the file in chunks. Just because you are
> reading in a new page doesn't mean that you have finished with the pages
> behind it.

right, i agree. the read-ahead logic i'm adding only works for strictly
sequentially accessed pages to catch the case where an application mmaps a
file and "streams" it (a la grep or mpg123). in that case, it seems safe
to unreference the pages behind the current faulting page since we're
fairly certain that the application won't be going back. and,
unreferencing doesn't take the page out of the page cache, it simply makes
it more likely to be reaped by shrink_mmap. so this is only an issue
during periods when memory is low.

- Chuck Lever
--
corporate: <chuckl@netscape.com>
personal: <chucklever@netscape.net> or <cel@monkey.org>

The Linux Scalability project:
http://www.citi.umich.edu/projects/linux-scalability/


-
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:53    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site