linux/drivers/scsi/lpfc
Justin Tee 2ffd47deca scsi: lpfc: Update lpfc_ramp_down_queue_handler() logic
[ Upstream commit bb01163143 ]

Typically when an out of resource CQE status is detected, the
lpfc_ramp_down_queue_handler() logic is called to help reduce I/O load by
reducing an sdev's queue_depth.

However, the current lpfc_rampdown_queue_depth() logic does not help reduce
queue_depth.  num_cmd_success is never updated and is always zero, which
means new_queue_depth will always be set to sdev->queue_depth.  So,
new_queue_depth = sdev->queue_depth - new_queue_depth always sets
new_queue_depth to zero.  And, scsi_change_queue_depth(sdev, 0) is
essentially a no-op.

Change the lpfc_ramp_down_queue_handler() logic to set new_queue_depth
equal to sdev->queue_depth subtracted from number of times num_rsrc_err was
incremented.  If num_rsrc_err is >= sdev->queue_depth, then set
new_queue_depth equal to 1.  Eventually, the frequency of Good_Status
frames will signal SCSI upper layer to auto increase the queue_depth back
to the driver default of 64 via scsi_handle_queue_ramp_up().

Signed-off-by: Justin Tee <justin.tee@broadcom.com>
Link: https://lore.kernel.org/r/20240305200503.57317-5-justintee8345@gmail.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-05-17 11:43:50 +02:00
..
lpfc_attr.c
lpfc_attr.h
lpfc_bsg.c
lpfc_bsg.h
lpfc_compat.h
lpfc_crtn.h
lpfc_ct.c
lpfc_debugfs.c scsi: lpfc: Prevent lpfc_debugfs_lockstat_write() buffer overflow 2023-05-30 12:44:02 +01:00
lpfc_debugfs.h
lpfc_disc.h
lpfc_els.c
lpfc_hbadisc.c
lpfc_hw4.h scsi: lpfc: Allow reduced polling rate for nvme_admin_async_event cmd completion 2022-06-22 14:11:20 +02:00
lpfc_hw.h
lpfc_ids.h
lpfc_init.c scsi: lpfc: Fix possible file string name overflow when updating firmware 2024-02-23 08:24:57 +01:00
lpfc_logmsg.h
lpfc_mbox.c
lpfc_mem.c
lpfc_nl.h
lpfc_nportdisc.c scsi: lpfc: Fix possible memory leak in lpfc_rcv_padisc() 2024-04-13 12:51:38 +02:00
lpfc_nvme.c scsi: lpfc: Allow reduced polling rate for nvme_admin_async_event cmd completion 2022-06-22 14:11:20 +02:00
lpfc_nvme.h
lpfc_nvmet.c scsi: lpfc: Correct size for wqe for memset() 2024-04-13 12:51:32 +02:00
lpfc_nvmet.h
lpfc_scsi.c scsi: lpfc: Update lpfc_ramp_down_queue_handler() logic 2024-05-17 11:43:50 +02:00
lpfc_scsi.h
lpfc_sli4.h
lpfc_sli.c scsi: lpfc: Avoid usage of list iterator variable after loop 2023-04-05 11:16:39 +02:00
lpfc_sli.h
lpfc_version.h
lpfc_vport.c
lpfc_vport.h
lpfc.h scsi: lpfc: Update lpfc_ramp_down_queue_handler() logic 2024-05-17 11:43:50 +02:00
Makefile