On 10/06/2011 07:25 PM, Dmitry Kurochkin wrote: > Current swap-timeout code does not know about max-swap-rate. It > simply finds the longest-waiting I/O in disker queues (incoming and > outgoing) and then assumes that the new I/O will wait at least that > long. The assumption is likely to be wrong when the queue contains > lots of freshly queued requests to disker: Those requests have not > waited long yet, but a max-swap-rate limit will slow them down > shortly. > > The patch changes the swap-timeout code to account for max-swap-rate > when dealing with the workers-to-disker queue: If there are N requests > pending, the new one will wait at least N/max-swap-rate seconds. Also > expected wait time is adjusted based on the queue "balance" member, in > case we have been borrowing time against future I/O already.
Committed to Squid3 trunk as r11793. Thank you, Alex.
