diff options
author | Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com> | 2017-05-10 09:39:38 -0700 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2017-06-12 20:47:59 -0400 |
commit | 58eaffe54bca77fbf1a1bad7703265950a758cd1 (patch) | |
tree | dc9136b701996bab1be8f259b0c2056b8b411738 /drivers/scsi | |
parent | d58129c96b3cde4821763b08b5f1bba17f031138 (diff) | |
download | linux-58eaffe54bca77fbf1a1bad7703265950a758cd1.tar.gz linux-58eaffe54bca77fbf1a1bad7703265950a758cd1.tar.bz2 linux-58eaffe54bca77fbf1a1bad7703265950a758cd1.zip |
scsi: aacraid: Set correct Queue Depth for HBA1000 RAW disks
The default queue depth for non NATIVE RAW disks is calculated from the
number of fibs and number of disks or a max of 256. This causes poor disk
IO performance.
The fix is to set default qd based on the type of disks
(SATA -32 and SAS -64)
Signed-off-by: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com>
Reviewed-by: David Carroll <david.carroll@microsemi.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/aacraid/linit.c | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c index 5e1a2d67d90c..9ef98e40d81a 100644 --- a/drivers/scsi/aacraid/linit.c +++ b/drivers/scsi/aacraid/linit.c @@ -405,17 +405,23 @@ static int aac_slave_configure(struct scsi_device *sdev) int chn, tid; unsigned int depth = 0; unsigned int set_timeout = 0; + bool set_qd_dev_type = false; + u8 devtype = 0; chn = aac_logical_to_phys(sdev_channel(sdev)); tid = sdev_id(sdev); - if (chn < AAC_MAX_BUSES && tid < AAC_MAX_TARGETS && - aac->hba_map[chn][tid].devtype == AAC_DEVTYPE_NATIVE_RAW) { - depth = aac->hba_map[chn][tid].qd_limit; + if (chn < AAC_MAX_BUSES && tid < AAC_MAX_TARGETS && aac->sa_firmware) { + devtype = aac->hba_map[chn][tid].devtype; + + if (devtype == AAC_DEVTYPE_NATIVE_RAW) + depth = aac->hba_map[chn][tid].qd_limit; + else if (devtype == AAC_DEVTYPE_ARC_RAW) + set_qd_dev_type = true; + set_timeout = 1; goto common_config; } - if (aac->jbod && (sdev->type == TYPE_DISK)) sdev->removable = 1; @@ -470,16 +476,22 @@ static int aac_slave_configure(struct scsi_device *sdev) if (sdev_channel(sdev) != NATIVE_CHANNEL) goto common_config; - /* - * Check if SATA drive - */ + set_qd_dev_type = true; + + } + +common_config: + + /* + * Check if SATA drive + */ + if (set_qd_dev_type) { if (strncmp(sdev->vendor, "ATA", 3) == 0) depth = 32; else depth = 64; } -common_config: /* * Firmware has an individual device recovery time typically * of 35 seconds, give us a margin. |