summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_disc.h
diff options
context:
space:
mode:
authorJames Smart <jsmart2021@gmail.com>2018-07-31 17:23:22 -0700
committerMartin K. Petersen <martin.petersen@oracle.com>2018-08-02 15:45:19 -0400
commit2a5b7d626ed2256fd0ef0e799ebc6ef47b7bd283 (patch)
tree63fb5737e68253ae59db6fa2d5a46fab21b90b02 /drivers/scsi/lpfc/lpfc_disc.h
parent93a3922da428ec0752e8b2ab00c42dadbbf805a9 (diff)
scsi: lpfc: Limit tracking of tgt queue depth in fast path
Performance is affected when target queue depth is tracked. An atomic counter is incremented on the submission path which competes with it being decremented on the completion path. In addition, multiple CPUs can simultaniously be manipulating this counter for the same ndlp. Reduce the overhead by only performing the target increment/decrement when the target queue depth is less than the overall adapter depth, thus is actually meaningful. Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com> Signed-off-by: James Smart <james.smart@broadcom.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_disc.h')
-rw-r--r--drivers/scsi/lpfc/lpfc_disc.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/scsi/lpfc/lpfc_disc.h b/drivers/scsi/lpfc/lpfc_disc.h
index 376f02819f20..28e2b60fc5c0 100644
--- a/drivers/scsi/lpfc/lpfc_disc.h
+++ b/drivers/scsi/lpfc/lpfc_disc.h
@@ -150,6 +150,9 @@ struct lpfc_node_rrq {
unsigned long rrq_stop_time;
};
+#define lpfc_ndlp_check_qdepth(phba, ndlp) \
+ (ndlp->cmd_qdepth < phba->sli4_hba.max_cfg_param.max_xri)
+
/* Defines for nlp_flag (uint32) */
#define NLP_IGNR_REG_CMPL 0x00000001 /* Rcvd rscn before we cmpl reg login */
#define NLP_REG_LOGIN_SEND 0x00000002 /* sent reglogin to adapter */