Re: clustering page-ins

Stephen C. Tweedie (sct@redhat.com)
Mon, 26 Jul 1999 22:26:07 +0100 (BST)


Hi,

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.

The reason this is so important is that for very large data sets (where
the file size is > physical memory), doing unmap-behind is an important
optimisation we will eventually want to make. In other words,
deliberately evict the unused pages we have already passed over from the
process's working set (but leave them in cache) if we are short of
memory, on the basis that doing the sequential IO to reread them is
going to be much cheaper than doing random paging.

--Stephen

-
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/