On 10/13/2011 08:05 AM, Dmitry Kurochkin wrote:
> 
> Before the change, IpcIoFile::WaitBeforePop() delayed both swap ins
> (hits) and swap outs (misses).  This is suboptimal because reads do
> not usually accumulate unfinished I/O requests in OS buffers and,
> hence, do not eventually require the OS to block all I/O.
> 
> Ideally, a disker should probably dequeue all pending disker requests,
> satisfy reads ASAP, and then handle writes, but that is difficult for
> several reasons.  The patch implements a simpler approach: peek the
> next request to be popped, and if it is a swap in (i.e., read or hit),
> then pop it without any delay.
> 
> When a read is popped, we still adjust the balance member and LastIo,
> because we do want to maintain the configured average I/O rate. When a
> write request comes in, it will be delayed [longer] if needed.
> 
> In the extreme case of a very long stream of read requests (no writes
> at all), there will be essentially no I/O rate limit and that is what
> we want.

Committed to trunk as r11825.

Thank you,

Alex.

Reply via email to