Commit b18268fc authored by Salyzyn, Mark's avatar Salyzyn, Mark Committed by James Bottomley

[SCSI] aacraid: improve queue balancing

The adapter queue is divided up equally to all the arrays to prevent
command starvation to any individual array. On the other hand,
physical targets are only granted a queue depth of one each. The code
prior to this patch used to deal with the incremental discovery of
targets, but the driver knows how many arrays are present prior to the
scan so this knowledge is used to generate a better estimate for the
queue depth.

Remove the capability of 'physical=0' from preventing access to the
class of adapters that have the RAID/SCSI mode of operation since none
of the physicals on the SCSI channel are candidates ever for an array.

As always, the user can override this default queue depth policy by
making the appropriate adjustments utilizing sysfs.
Signed-off-by: default avatarMark Salyzyn <aacraid@adaptec.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@HansenPartnership.com>
parent b6ef70f3
...@@ -401,16 +401,14 @@ static int aac_biosparm(struct scsi_device *sdev, struct block_device *bdev, ...@@ -401,16 +401,14 @@ static int aac_biosparm(struct scsi_device *sdev, struct block_device *bdev,
static int aac_slave_configure(struct scsi_device *sdev) static int aac_slave_configure(struct scsi_device *sdev)
{ {
struct aac_dev *aac = (struct aac_dev *)sdev->host->hostdata;
if ((sdev->type == TYPE_DISK) && if ((sdev->type == TYPE_DISK) &&
(sdev_channel(sdev) != CONTAINER_CHANNEL)) { (sdev_channel(sdev) != CONTAINER_CHANNEL) &&
(!aac->raid_scsi_mode || (sdev_channel(sdev) != 2))) {
if (expose_physicals == 0) if (expose_physicals == 0)
return -ENXIO; return -ENXIO;
if (expose_physicals < 0) { if (expose_physicals < 0)
struct aac_dev *aac = sdev->no_uld_attach = 1;
(struct aac_dev *)sdev->host->hostdata;
if (!aac->raid_scsi_mode || (sdev_channel(sdev) != 2))
sdev->no_uld_attach = 1;
}
} }
if (sdev->tagged_supported && (sdev->type == TYPE_DISK) && if (sdev->tagged_supported && (sdev->type == TYPE_DISK) &&
(sdev_channel(sdev) == CONTAINER_CHANNEL)) { (sdev_channel(sdev) == CONTAINER_CHANNEL)) {
...@@ -419,6 +417,7 @@ static int aac_slave_configure(struct scsi_device *sdev) ...@@ -419,6 +417,7 @@ static int aac_slave_configure(struct scsi_device *sdev)
unsigned num_lsu = 0; unsigned num_lsu = 0;
unsigned num_one = 0; unsigned num_one = 0;
unsigned depth; unsigned depth;
unsigned cid;
/* /*
* Firmware has an individual device recovery time typically * Firmware has an individual device recovery time typically
...@@ -426,11 +425,15 @@ static int aac_slave_configure(struct scsi_device *sdev) ...@@ -426,11 +425,15 @@ static int aac_slave_configure(struct scsi_device *sdev)
*/ */
if (sdev->timeout < (45 * HZ)) if (sdev->timeout < (45 * HZ))
sdev->timeout = 45 * HZ; sdev->timeout = 45 * HZ;
for (cid = 0; cid < aac->maximum_num_containers; ++cid)
if (aac->fsa_dev[cid].valid)
++num_lsu;
__shost_for_each_device(dev, host) { __shost_for_each_device(dev, host) {
if (dev->tagged_supported && (dev->type == TYPE_DISK) && if (dev->tagged_supported && (dev->type == TYPE_DISK) &&
(sdev_channel(dev) == CONTAINER_CHANNEL)) (sdev_channel(dev) == CONTAINER_CHANNEL)) {
++num_lsu; if (!aac->fsa_dev[sdev_id(dev)].valid)
else ++num_lsu;
} else
++num_one; ++num_one;
} }
if (num_lsu == 0) if (num_lsu == 0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment