Subject: Re: I/O priorities
To: David Laight <david@l8s.co.uk>
From: Chuck Silvers <chuq@chuq.com>
List: tech-kern
Date: 06/20/2002 08:52:41
On Thu, Jun 20, 2002 at 03:49:52PM +0100, David Laight wrote:
> Maybe the number of queued disk write requests generated by the
> pagedaemon? (ie writes that are being done to generate free pages)
> should be restricted?
> That way it would never take too long for a read request (to page
> something in) to be executed.
> After all pages don't get freed faster if you have more writes
> scheduled.

the pagedaemon already does this.  I put that change in before
the 1.4 release, I think.  prior to that, we would often continue
starting pageouts until pager_map filled up, causing latency problems
like you describe.


> The other question is which pages are chosed to be invalidated?
> If someone is copying a large file, or making a large iso image,
> then you actually want to discard the pages that have been used
> earlier by the copy - rather than those used by the long standing
> X server etc.

we already do this too, more or less.  the usage-balancing code
does this on a very course level, which seems to be good enough
(now that I fixed the accounting problem for kernel stacks).


> ISTM that pages that have been used a lot of times but not in
> the immediate past should be preserved in preference to pages
> that have only been used once but very recently.
> (a naive implemtation of this wort work though...)

yea, that seems like a reasonable idea.  some other people were working
on an implementation of this a year or so ago, but it was never finished.

-Chuck