scsi: hpsa: limit transfer length to 1MB
authorYadan Fan <ydfan@suse.com>
Fri, 23 Jun 2017 09:40:05 +0000 (17:40 +0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 18 Jul 2017 02:51:47 +0000 (22:51 -0400)
The hpsa firmware will bypass the cache for any request larger than 1MB,
so we should cap the request size to avoid any performance degradation
in kernels later than v4.3

This degradation is caused from d2be537c3ba3568acd79cd178327b842e60d035e,
which changed max_sectors_kb to 1280k, but the hardware is able to work
fine with it, so the true fix should be from hpsa driver.

Signed-off-by: Yadan Fan <ydfan@suse.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Acked-by: Don Brace <don.brace@microsemi.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/hpsa.c

index 8914eab843372fe3dde09e97b0d2c45aa65bbf64..4f7cdb28bd38fbadc6105906f56fe813346c299c 100644 (file)
@@ -938,7 +938,7 @@ static struct scsi_host_template hpsa_driver_template = {
 #endif
        .sdev_attrs = hpsa_sdev_attrs,
        .shost_attrs = hpsa_shost_attrs,
-       .max_sectors = 8192,
+       .max_sectors = 1024,
        .no_write_same = 1,
 };