scsi: lpfc: Make ktime sampling more accurate
authorDick Kennedy <dick.kennedy@broadcom.com>
Sat, 30 Sep 2017 00:34:33 +0000 (17:34 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 3 Oct 2017 02:46:35 +0000 (22:46 -0400)
commitc8a4ce0bf3aad1a73d5122a3781a0be83bc0d0a4
treee75c5208cf24295adf7355d815aab0714d4994fe
parente8bcf0ae4c0346fdc78ebefe0eefcaa6a6622d38
scsi: lpfc: Make ktime sampling more accurate

Need to make ktime samples more accurate

If ktime is turned on in the middle of an IO, the max calculation could
be misleading. Base sampling on the start time of the IO as opposed to
ktime_on.

Make ISR ktime timestamps be from when CQE is read instead of EQE.
Added additional sanity checks when deciding whether to accept an IO
sample or not.

Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <james.smart@broadcom.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/lpfc/lpfc_nvme.c
drivers/scsi/lpfc/lpfc_nvmet.c
drivers/scsi/lpfc/lpfc_sli.c