mpt3sas: Set maximum transfer length per IO to 4MB for VDs
authorChaitra P B <chaitra.basappa@broadcom.com>
Fri, 6 May 2016 08:59:30 +0000 (14:29 +0530)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 11 May 2016 20:13:38 +0000 (16:13 -0400)
Set maximum transfer length per IO on RAID volumes to 4MB by setting
VD's queue's max_sector to 8192.

Signed-off-by: Chaitra P B <chaitra.basappa@broadcom.com>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/mpt3sas/mpt3sas_base.h
drivers/scsi/mpt3sas/mpt3sas_scsih.c

index af2099a5d3f7e45a0099c7f33d9e0d75d6430565..71b1c58fec3bdec541d97fd08849a0a9b1a8491f 100644 (file)
 #define MPT3SAS_SAS_QUEUE_DEPTH                254
 #define MPT3SAS_RAID_QUEUE_DEPTH       128
 
+#define MPT3SAS_RAID_MAX_SECTORS       8192
+
 #define MPT_NAME_LENGTH                        32      /* generic length of strings */
 #define MPT_STRING_LENGTH              64
 
index d256fc0fcc98b7faf93fbc9728bed3172b1cc378..7217218edbac8f1a0867ffe3e18f9aafeb031082 100644 (file)
@@ -1909,6 +1909,14 @@ scsih_slave_configure(struct scsi_device *sdev)
                            (unsigned long long)raid_device->wwid,
                            raid_device->num_pds, ds);
 
+               if (shost->max_sectors > MPT3SAS_RAID_MAX_SECTORS) {
+                       blk_queue_max_hw_sectors(sdev->request_queue,
+                                               MPT3SAS_RAID_MAX_SECTORS);
+                       sdev_printk(KERN_INFO, sdev,
+                                       "Set queue's max_sector to: %u\n",
+                                               MPT3SAS_RAID_MAX_SECTORS);
+               }
+
                scsih_change_queue_depth(sdev, qdepth);
 
                /* raid transport support */