]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
scsi: aacraid: Added 32 and 64 queue depth for arc natives
authorRaghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com>
Wed, 10 May 2017 16:39:37 +0000 (09:39 -0700)
committerThadeu Lima de Souza Cascardo <cascardo@canonical.com>
Wed, 28 Jun 2017 14:24:15 +0000 (11:24 -0300)
BugLink: http://bugs.launchpad.net/bugs/1689980
The qd for ARC Native disks is calculated by dividing the max IO 1024
by the number of disks or 256 which ever is lower. This causes poor
disk IO performance.

The fix is set the qd based on the type of disk (SAS - 64 and SATA -
32).

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>
(cherry picked from commit 7ad76ab572037fae99c244dbd97cc5db763a31db linux-next)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Colin King <colin.king@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/scsi/aacraid/aacraid.h
drivers/scsi/aacraid/linit.c

index d281492009fb4457131b5ef87b04b58d8f3d94c3..cb7d69939a346804d5dd3cc7575bd0dfbdcc3a94 100644 (file)
@@ -415,6 +415,7 @@ struct aac_ciss_identify_pd {
  * These macros convert from physical channels to virtual channels
  */
 #define CONTAINER_CHANNEL              (0)
+#define NATIVE_CHANNEL                 (1)
 #define CONTAINER_TO_CHANNEL(cont)     (CONTAINER_CHANNEL)
 #define CONTAINER_TO_ID(cont)          (cont)
 #define CONTAINER_TO_LUN(cont)         (0)
index 5a201da932509ef8501be8b23320dadab4146982..5e1a2d67d90c008b21b8e0bebf325782162a6eee 100644 (file)
@@ -466,6 +466,17 @@ static int aac_slave_configure(struct scsi_device *sdev)
                        ++num_lsu;
 
                depth = (host->can_queue - num_one) / num_lsu;
+
+               if (sdev_channel(sdev) != NATIVE_CHANNEL)
+                       goto common_config;
+
+               /*
+                * Check if SATA drive
+                */
+               if (strncmp(sdev->vendor, "ATA", 3) == 0)
+                       depth = 32;
+               else
+                       depth = 64;
        }
 
 common_config: