1
0
Fork 0

SCSI fixes on 20170725

Three small fixes.  The transfer size fixes are actually correcting
 some performance drops on the hpsa and smartpqi cards.  The cards
 actually have an internal cache for request speed up but bypass it for
 transfers > 1MB.  Since 4.3 the efficiency of our merges has rendered
 the cache mostly unused, so limit transfers to under 1MB to recover
 the cache boost.
 
 Signed-off-by: James E.J. Bottomley <jejb@linux.vnet.ibm.com>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABAgAGBQJZd9JkAAoJEAVr7HOZEZN4vp0P/3jzI6VM/yZM/dVRRc0BizCQ
 fsZRVTsin0FPnsztaA/S4aGIpSLFZE2TfF2AXEuwMw2hqGfvdF+7lrPkQb50j7a+
 YP3M17hBN1J015BKm9lCN/fhVVCONxhZtnqxoXxiiRaakKkTuucC32NyAB85ans0
 2OTh+fpodSQmPtX2bDU3bFx0AdSIX5aZgW2XhLBtosH9dRT/HrJ4svkIr3FVMBzV
 CZD0YXqsush9xwZJJy2nkcW44yhL1xtcdN30YkWuSJOnITt6RgWGMhiTrZCa2sNR
 LZSRkb47WohaNY9TR67NhsGv3z8FY3FhXO507SCs1HBZL/DIXVg+DDkF5pirAdR9
 THLXvaNAFuYORgYum4UQJOqUM9a0lh/CWRYioQtQBlXNnvvvUE2fRRsgGGHU+G+D
 9mMjUPGQhlLhOM/1h5OxGqnArcugb18LflBfPhfJ22XnK0KDj9c3CW68quNHLiBg
 SGLZxUjlnHe1Ebe6T4UR1/fv/mp2LsIhXvQvFnfAqCp8ehj7wjl02R8CG0c4ldGu
 4u4o4zLxHyz27sXpST0je89ceGaHVyCMmFyQ4xxUB61TPSaC52FGjxz2m8RQAaSm
 fowc6niH8RtJ+v7EwDje/9BFOIVfn/Y/wKcSjKdV7kvh9zZQ7FB06sW7fhhUhqqh
 IYLXDAo2AYis/FnL932c
 =7jN6
 -----END PGP SIGNATURE-----

Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi

Pull SCSI fixes from James Bottomley:
 "Three small fixes.

  The transfer size fixes are actually correcting some performance drops
  on the hpsa and smartpqi cards. The cards actually have an internal
  cache for request speed up but bypass it for transfers > 1MB. Since
  4.3 the efficiency of our merges has rendered the cache mostly unused,
  so limit transfers to under 1MB to recover the cache boost"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
  scsi: sg: fix static checker warning in sg_is_valid_dxfer
  scsi: smartpqi: limit transfer length to 1MB
  scsi: hpsa: limit transfer length to 1MB
hifive-unleashed-5.1
Linus Torvalds 2017-07-25 20:10:10 -07:00
commit fd2b2c57ec
3 changed files with 7 additions and 4 deletions

View 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,
};

View File

@ -759,8 +759,11 @@ static bool sg_is_valid_dxfer(sg_io_hdr_t *hp)
return false;
return true;
case SG_DXFER_FROM_DEV:
if (hp->dxfer_len < 0)
return false;
/*
* for SG_DXFER_FROM_DEV we always set dxfer_len to > 0. dxferp
* can either be NULL or != NULL so there's no point in checking
* it either. So just return true.
*/
return true;
case SG_DXFER_TO_DEV:
case SG_DXFER_TO_FROM_DEV:

View File

@ -690,7 +690,7 @@ struct pqi_config_table_heartbeat {
#define PQI_MAX_OUTSTANDING_REQUESTS ((u32)~0)
#define PQI_MAX_OUTSTANDING_REQUESTS_KDUMP 32
#define PQI_MAX_TRANSFER_SIZE (4 * 1024U * 1024U)
#define PQI_MAX_TRANSFER_SIZE (1024U * 1024U)
#define PQI_MAX_TRANSFER_SIZE_KDUMP (512 * 1024U)
#define RAID_MAP_MAX_ENTRIES 1024