Re: [RFC] Arch option to touch newly allocated pages

From: Rik van Riel (riel@conectiva.com.br)
Date: Thu Mar 07 2002 - 16:23:36 EST


On Thu, 7 Mar 2002, Andrew Morton wrote:

> > Nope. Readahead pages are clean and very easy to evict, so
> > it's still trivial to evict all the pages from another readahead
> > window because everybody's readahead window is too large.

> Any clever ideas?

1) keep track of which pages we are reading ahead
   ... the readahead code already does this

2) at read() or fault time, see if the page
   (a) is resident
   (b) is in the current readahead window,
       ie. already read ahead

3) if the page is in the current readahead window
   but NOT resident, the page was read in and
   evicted before we got around to using it, so
   readahead window thrashing is going on
   ... in that case, collapse the size of the
   readahead window TCP-style

4) slowly growing the readahead window when there is
   enough memory available, in order to minimise the
   number of disk seeks

5) the growing in (3) and shrinking in (4) mean that
   the readahead size of all streaming IO in the system
   gets automatically balanced against each other and
   against other memory demand in the system

regards,

Rik

-- 
<insert bitkeeper endorsement here>

http://www.surriel.com/ http://distro.conectiva.com/

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Mar 07 2002 - 21:01:09 EST