[patch 2.5] ips queue depths

Jeffery, David
2002-10-15T18:55:46Z

[-- Attachment #1: Type: text/plain, Size: 379 bytes --]

Dave,

Here's a patch that should restore the queue depths to what they were before
the
queue depths change was merged in. Hopefully this well restore your lost
performance. If I don't hear or find anything bad about it, it will be
going
to Linus shortly.

And thanks goes to Mike Anderson for his initial version. That made writing
this patch all the easier.

David Jeffery

[-- Attachment #2: ips2.5.42.patch --]
[-- Type: application/octet-stream, Size: 673 bytes --]

--- linux-2.5.42/drivers/scsi/ips.c Tue Oct 15 14:34:16 2002
+++ linux-2.5.42_new/drivers/scsi/ips.c Tue Oct 15 14:24:13 2002
@@ -1877,12 +1877,16 @@
{
ips_ha_t *ha;
int min;
+ int depth;

ha = IPS_HA(SDptr->host);
min = ha->max_cmds / 4;
- if (min < 8)
- min = ha->max_cmds - 1;
- scsi_adjust_queue_depth(SDptr, MSG_ORDERED_TAG, min);
+ if((SDptr->type == TYPE_DISK) && ha->enq->ucLogDriveCount){
+ depth = (ha->max_cmds - 1) / ha->enq->ucLogDriveCount;
+ depth = max(min, depth);
+ } else
+ depth = 2;
+ scsi_adjust_queue_depth(SDptr, MSG_SIMPLE_TAG, depth);
return 0;
}