Re: [patch 2.5] ips queue depths

Mike Anderson
2002-10-15T22:10:31Z

James Bottomley [James.Bottomley@steeleye.com] wrote:
> andmike@us.ibm.com said:
> > I never seen the mid layer handle device starvation correctly. It
> > might be because in scsi_queue_next_request we do this:
>
> > /*
> > * Just hit the requeue function for the queue.
> > */
> > q->request_fn(q);
>
> > before we check for starved.
>
> This starvation code has nothing to do with fairness. It's job is purely to
> restart the device queue if we got a host blocked condition and we had to
> reject commands with zero depth. When the host blocked abates then we loop
> over all the starved devices and call their request functions. Without this,
> we could get a hang in the block layer queueing.

I am mis-reading what your saying.

Ok it will not handle fairness, but it will trigger a starved and
some_device_starved case when SHpnt->can_queue > 0 and SHpnt->host_busy >=
SHpnt->can_queue. Which is the case we where discussing and is not a
host blocked condition. The reverse ordering of the request_fn call
could cause a device to stayed starved if the device queue depth is near
or equal to the host can_queue.

-andmike
--
Michael Anderson
andmike@us.ibm.com