]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
megaraid_sas: Permit large RAID0/1 requests
authorMartin K. Petersen <martin.petersen@oracle.com>
Wed, 1 Oct 2014 21:09:31 +0000 (17:09 -0400)
committerSantosh Shilimkar <santosh.shilimkar@oracle.com>
Mon, 29 Jun 2015 15:32:51 +0000 (08:32 -0700)
Orabug: 19625877

Allow max_sectors to be tuned to enable I/O request sizes of 1MB. This
is not supported for RAID5/6 volumes but the UEK[23] kernels lack an
infrastructure for communicating per-LUN request size limits. This has
been remedied by upstream commit bcdb247c6b6a.

In the meantime allow setting the max_sectors module parameter to 1MB
for Invader and Fury cards.

Signed-off-by: Kashyap Desai <kashyap.desai@avagotech.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Guangyu Sun <guangyu.sun@oracle.com>
(cherry picked from commit 54e01aad1ef694d7ec4026d2efb5c8d19f981513)
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/megaraid/megaraid_sas_base.c

index a022c39153cfcf42ae296231e84acd109cd47881..8477fc282aa44b766629fde9779e74447642a513 100644 (file)
@@ -64,7 +64,8 @@
 static unsigned int max_sectors;
 module_param_named(max_sectors, max_sectors, int, 0);
 MODULE_PARM_DESC(max_sectors,
-       "Maximum number of sectors per IO command");
+       "Maximum number of sectors per IO command."
+       "Used only for deployments where R5/R6 Volumes are not used.");
 
 static int msix_disable;
 module_param(msix_disable, int, S_IRUGO);
@@ -5073,17 +5074,31 @@ static int megasas_io_attach(struct megasas_instance *instance)
        if (max_sectors && max_sectors < instance->max_sectors_per_req)
                instance->max_sectors_per_req = max_sectors;
        else {
+               /* The max_sectors module parameter permits increasing
+                * max sectors to 2048.  Users should only use this
+                * parameter in configurations where R5/R6 Volumes are
+                * not being used.  NOTE: This module parameter will
+                * enable driver to send 1M I/Os for R5/R6 volumes which
+                * may result in unexpected behavior.
+                */
                if (max_sectors) {
                        if (((instance->pdev->device ==
                                PCI_DEVICE_ID_LSI_SAS1078GEN2) ||
                                (instance->pdev->device ==
-                               PCI_DEVICE_ID_LSI_SAS0079GEN2)) &&
+                               PCI_DEVICE_ID_LSI_SAS0079GEN2) ||
+                               (instance->pdev->device ==
+                               PCI_DEVICE_ID_LSI_INVADER) ||
+                               (instance->pdev->device ==
+                               PCI_DEVICE_ID_LSI_FURY)) &&
                                (max_sectors <= MEGASAS_MAX_SECTORS)) {
                                instance->max_sectors_per_req = max_sectors;
+                               dev_info(&instance->pdev->dev,
+                                       "max_sectors per request is set to %d\n",
+                                       instance->max_sectors_per_req);
                        } else {
-                       printk(KERN_INFO "megasas: max_sectors should be > 0"
-                               "and <= %d (or < 1MB for GEN2 controller)\n",
-                               instance->max_sectors_per_req);
+                               dev_warn(&instance->pdev->dev, " max_sectors should be > 0 and"
+                                       "<= %d (or < 1MB for supported controllers)\n",
+                                       instance->max_sectors_per_req);
                        }
                }
        }