Re: [patch 2.5] ips queue depths

James Bottomley
2002-10-15T20:38:17Z

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.

This could do with being converted over to the blk_stop/start_queue api.

The SCSI code seems to have been written with the idea that device queue_depth
<< can_queue and thus doesn't concern itself with resource fairness issues
when the two are closer in size to each other.

James