diff options
author | Quinn Tran <qutran@marvell.com> | 2020-09-04 06:51:26 +0200 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2020-09-23 00:42:49 +0200 |
commit | 89c72f4245a8510ffdb0d1980944210b8bc6e49f (patch) | |
tree | b81139c7985687e4aa13cba9d4e81114e61a97ab /drivers/scsi/qla2xxx/qla_isr.c | |
parent | scsi: qla2xxx: Add rport fields in debugfs (diff) | |
download | linux-89c72f4245a8510ffdb0d1980944210b8bc6e49f.tar.xz linux-89c72f4245a8510ffdb0d1980944210b8bc6e49f.zip |
scsi: qla2xxx: Add IOCB resource tracking
This patch tracks number of IOCB resources used in the I/O fast path. If
the number of used IOCBs reach a high water limit, driver would return the
I/O as busy and let upper layer retry. This prevents over subscription of
IOCB resources where any future error recovery command is unable to cut
through. Enable IOCB throttling by default.
Link: https://lore.kernel.org/r/20200904045128.23631-12-njavali@marvell.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Quinn Tran <qutran@marvell.com>
Signed-off-by: Arun Easi <aeasi@marvell.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_isr.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_isr.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c index 4d59d5b17655..4baa83996813 100644 --- a/drivers/scsi/qla2xxx/qla_isr.c +++ b/drivers/scsi/qla2xxx/qla_isr.c @@ -2901,6 +2901,7 @@ qla2x00_status_entry(scsi_qla_host_t *vha, struct rsp_que *rsp, void *pkt) } return; } + qla_put_iocbs(sp->qpair, &sp->iores); if (sp->cmd_type != TYPE_SRB) { req->outstanding_cmds[handle] = NULL; @@ -3313,6 +3314,7 @@ qla2x00_error_entry(scsi_qla_host_t *vha, struct rsp_que *rsp, sts_entry_t *pkt) default: sp = qla2x00_get_sp_from_handle(vha, func, req, pkt); if (sp) { + qla_put_iocbs(sp->qpair, &sp->iores); sp->done(sp, res); return 0; } |