Subject: Re: UBC, interactive performance, etc
To: Thor Lancelot Simon <tls@rek.tjls.com>
From: Simon J. Gerraty <sjg@quick.com.au>
List: tech-kern
Date: 04/10/2001 02:14:05
>I think the right way to address your concern -- though it's nontrivial --
>is to teach the I/O subsystem to attempt to maintain a constant rate of
>I/O.  Then we can flow-control the buffer cache so that we do not accept
>writes we can't clear in some known amount of time (let them block).

Yes this sounds like the "correct" solution.
Note I've not looked at the UVM implementation at all, so take this
for what its worth :-)

If we have a queue for the thread that writes out dirty buffers 
(see I can't even remember what its called :-), we use the length of that
queue as the throttling mechanism.   Finding the threshold length 
would be the tricky bit, but essentially if the queue gets shorter between
checks - you know its not long enough :-)  The goal is for the write out
queue to hit a steady length - and probably the actual length doesn't
matter.

In case that's not clear, imagine that each time the system goes to accept 
a write - it looks at the length out the write out queue, and if its less
than some minimal length (or its length last time we looked) we accept
the write, otherwise we block it.

--sjg