From: Raghava Aditya Renukunta Date: Wed, 10 May 2017 16:39:37 +0000 (-0700) Subject: scsi: aacraid: Added 32 and 64 queue depth for arc natives X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d58129c96b3cde4821763b08b5f1bba17f031138;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git scsi: aacraid: Added 32 and 64 queue depth for arc natives 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 Reviewed-by: David Carroll Signed-off-by: Martin K. Petersen --- diff --git a/drivers/scsi/aacraid/aacraid.h b/drivers/scsi/aacraid/aacraid.h index d281492009fb..cb7d69939a34 100644 --- a/drivers/scsi/aacraid/aacraid.h +++ b/drivers/scsi/aacraid/aacraid.h @@ -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) diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c index 5a201da93250..5e1a2d67d90c 100644 --- a/drivers/scsi/aacraid/linit.c +++ b/drivers/scsi/aacraid/linit.c @@ -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: