Skip to content

Commit

Permalink
mpt3sas: Set maximum transfer length per IO to 4MB for VDs
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Chaitra P B authored and Martin K. Petersen committed May 11, 2016
1 parent b2500d7 commit 6c19709
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/scsi/mpt3sas/mpt3sas_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@
#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

Expand Down
8 changes: 8 additions & 0 deletions drivers/scsi/mpt3sas/mpt3sas_scsih.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 6c19709

Please sign in to comment.