summaryrefslogtreecommitdiff
path: root/drivers/scsi/megaraid/megaraid_sas.h
diff options
context:
space:
mode:
authorKashyap Desai <kashyap.desai@broadcom.com>2021-01-22 10:33:14 +0800
committerMartin K. Petersen <martin.petersen@oracle.com>2021-03-04 17:37:00 -0500
commit6cb9b15238a389a8892a6ed08f5c68a0ac45d720 (patch)
tree5a5bef9c2bb36e77e80fb5256474745cd1ef24c0 /drivers/scsi/megaraid/megaraid_sas.h
parent9ebb4d70dc0e0e8989a13d156020db9d55fcfafd (diff)
downloadlwn-6cb9b15238a389a8892a6ed08f5c68a0ac45d720.tar.gz
lwn-6cb9b15238a389a8892a6ed08f5c68a0ac45d720.zip
scsi: megaraid_sas: Replace sdev_busy with local counter
Use local tracking of per-sdev outstanding command since sdev_busy in SCSI mid layer is improved for performance reason using sbitmap (earlier it was atomic variable). Link: https://lore.kernel.org/r/20210122023317.687987-11-ming.lei@redhat.com Cc: Omar Sandoval <osandov@fb.com> Cc: Kashyap Desai <kashyap.desai@broadcom.com> Cc: Sumanesh Samanta <sumanesh.samanta@broadcom.com> Cc: Ewan D. Milne <emilne@redhat.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Kashyap Desai <kashyap.desai@broadcom.com> Signed-off-by: Ming Lei <ming.lei@redhat.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/megaraid/megaraid_sas.h')
-rw-r--r--drivers/scsi/megaraid/megaraid_sas.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/scsi/megaraid/megaraid_sas.h b/drivers/scsi/megaraid/megaraid_sas.h
index 0f808d63580e..0c6a56b24c6e 100644
--- a/drivers/scsi/megaraid/megaraid_sas.h
+++ b/drivers/scsi/megaraid/megaraid_sas.h
@@ -2019,10 +2019,12 @@ union megasas_frame {
* struct MR_PRIV_DEVICE - sdev private hostdata
* @is_tm_capable: firmware managed tm_capable flag
* @tm_busy: TM request is in progress
+ * @sdev_priv_busy: pending command per sdev
*/
struct MR_PRIV_DEVICE {
bool is_tm_capable;
bool tm_busy;
+ atomic_t sdev_priv_busy;
atomic_t r1_ldio_hint;
u8 interface_type;
u8 task_abort_tmo;