scsi: mpt3sas: Use firmware recommended queue depth
authorSuganath Prabu S <suganath-prabu.subramani@broadcom.com>
Mon, 9 Aug 2021 07:26:38 +0000 (12:56 +0530)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 10 Aug 2021 03:07:04 +0000 (23:07 -0400)
commit787f2448c23603d658d955402b166e1dde0dc1e5
tree5b9d9122a968cf4f4b8955f5c84c8d84a0f04b4c
parent44f88ef3c9f1edf4f8229508649965d85bc6f186
scsi: mpt3sas: Use firmware recommended queue depth

Currently, the mpt3sas driver sets the default queue depth based on the
physical interface of the attached device:

 - SAS : 254
 - SATA:  32
 - NVMe: 128

The IOC firmware provides a recommended queue depth for each device through
SAS IO Unit Page1 for SAS/SATA and PCIe IO Unit Page 1 for NVMe devices.

If the host sets the queue depth greater than the firmware recommended
value, then the IOC places the I/Os above the recommended queue depth in an
internal pending queue. This consumes outstanding host-credit/resources,
thereby leading to potential starvation of other devices.

To avoid this, use the device depth recommended by the IOC firmware.

Link: https://lore.kernel.org/r/20210809072639.21228-2-suganath-prabu.subramani@broadcom.com
Signed-off-by: Suganath Prabu S <suganath-prabu.subramani@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/mpt3sas/mpt3sas_base.c
drivers/scsi/mpt3sas/mpt3sas_base.h
drivers/scsi/mpt3sas/mpt3sas_config.c
drivers/scsi/mpt3sas/mpt3sas_ctl.c
drivers/scsi/mpt3sas/mpt3sas_scsih.c