* [PATCH] scsi:ufs:core: update compl_time_stamp_local_clock after complete a cqe
@ 2024-12-04 11:50 liuderong
2024-12-04 12:50 ` Bean Huo
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: liuderong @ 2024-12-04 11:50 UTC (permalink / raw)
To: alim.akhtar, avri.altman, bvanassche, James.Bottomley,
martin.petersen, peter.wang, manivannan.sadhasivam, ahalaney,
beanhuo, quic_mnaresh
Cc: linux-scsi, linux-kernel, liuderong
From: liuderong <liuderong@oppo.com>
For now, lrbp->compl_time_stamp_local_clock is set to zero
after send a sqe, but it is not updated after complete a cqe,
the printed information in ufshcd_print_tr will always be zero.
So update lrbp->cmpl_time_stamp_local_clock after complete a cqe.
Log sample:
ufshcd-qcom 1d84000.ufshc: UPIU[8] - issue time 8750227249 us
ufshcd-qcom 1d84000.ufshc: UPIU[8] - complete time 0 us
Signed-off-by: liuderong <liuderong@oppo.com>
---
drivers/ufs/core/ufshcd.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
index 6a26853..bd70fe1 100644
--- a/drivers/ufs/core/ufshcd.c
+++ b/drivers/ufs/core/ufshcd.c
@@ -5519,6 +5519,7 @@ void ufshcd_compl_one_cqe(struct ufs_hba *hba, int task_tag,
lrbp = &hba->lrb[task_tag];
lrbp->compl_time_stamp = ktime_get();
+ lrbp->compl_time_stamp_local_clock = local_clock();
cmd = lrbp->cmd;
if (cmd) {
if (unlikely(ufshcd_should_inform_monitor(hba, lrbp)))
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] scsi:ufs:core: update compl_time_stamp_local_clock after complete a cqe
2024-12-04 11:50 [PATCH] scsi:ufs:core: update compl_time_stamp_local_clock after complete a cqe liuderong
@ 2024-12-04 12:50 ` Bean Huo
2024-12-05 5:52 ` Peter Wang (王信友)
2024-12-05 9:07 ` Avri Altman
2 siblings, 0 replies; 4+ messages in thread
From: Bean Huo @ 2024-12-04 12:50 UTC (permalink / raw)
To: liuderong, alim.akhtar, avri.altman, bvanassche, James.Bottomley,
martin.petersen, peter.wang, manivannan.sadhasivam, ahalaney,
beanhuo, quic_mnaresh
Cc: linux-scsi, linux-kernel
On Wed, 2024-12-04 at 19:50 +0800, liuderong@oppo.com wrote:
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
> index 6a26853..bd70fe1 100644
> --- a/drivers/ufs/core/ufshcd.c
> +++ b/drivers/ufs/core/ufshcd.c
> @@ -5519,6 +5519,7 @@ void ufshcd_compl_one_cqe(struct ufs_hba *hba,
> int task_tag,
>
> lrbp = &hba->lrb[task_tag];
> lrbp->compl_time_stamp = ktime_get();
> + lrbp->compl_time_stamp_local_clock = local_clock();
probably, we should change lrbp->compl_time_stamp = ktime_get(); to
lrbp->compl_time_stamp = local_clock(); also, the name of
compl_time_stamp_local_clock, is so long, should be shorter.
but the patch is ok to me:
Reviewed-by: Bean Huo <beanhuo@micron.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] scsi:ufs:core: update compl_time_stamp_local_clock after complete a cqe
2024-12-04 11:50 [PATCH] scsi:ufs:core: update compl_time_stamp_local_clock after complete a cqe liuderong
2024-12-04 12:50 ` Bean Huo
@ 2024-12-05 5:52 ` Peter Wang (王信友)
2024-12-05 9:07 ` Avri Altman
2 siblings, 0 replies; 4+ messages in thread
From: Peter Wang (王信友) @ 2024-12-05 5:52 UTC (permalink / raw)
To: ahalaney@redhat.com, quic_mnaresh@quicinc.com, beanhuo@micron.com,
avri.altman@wdc.com, martin.petersen@oracle.com,
liuderong@oppo.com, bvanassche@acm.org, alim.akhtar@samsung.com,
manivannan.sadhasivam@linaro.org,
James.Bottomley@HansenPartnership.com
Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
On Wed, 2024-12-04 at 19:50 +0800, liuderong@oppo.com wrote:
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
>
>
> From: liuderong <liuderong@oppo.com>
>
> For now, lrbp->compl_time_stamp_local_clock is set to zero
> after send a sqe, but it is not updated after complete a cqe,
> the printed information in ufshcd_print_tr will always be zero.
> So update lrbp->cmpl_time_stamp_local_clock after complete a cqe.
>
> Log sample:
> ufshcd-qcom 1d84000.ufshc: UPIU[8] - issue time 8750227249 us
> ufshcd-qcom 1d84000.ufshc: UPIU[8] - complete time 0 us
>
> Signed-off-by: liuderong <liuderong@oppo.com>
> ---
> drivers/ufs/core/ufshcd.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
> index 6a26853..bd70fe1 100644
> --- a/drivers/ufs/core/ufshcd.c
> +++ b/drivers/ufs/core/ufshcd.c
> @@ -5519,6 +5519,7 @@ void ufshcd_compl_one_cqe(struct ufs_hba *hba,
> int task_tag,
>
> lrbp = &hba->lrb[task_tag];
> lrbp->compl_time_stamp = ktime_get();
> + lrbp->compl_time_stamp_local_clock = local_clock();
> cmd = lrbp->cmd;
> if (cmd) {
> if (unlikely(ufshcd_should_inform_monitor(hba,
> lrbp)))
> --
> 2.7.4
Reviewed-by: Peter Wang <peter.wang@mediatek.com>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH] scsi:ufs:core: update compl_time_stamp_local_clock after complete a cqe
2024-12-04 11:50 [PATCH] scsi:ufs:core: update compl_time_stamp_local_clock after complete a cqe liuderong
2024-12-04 12:50 ` Bean Huo
2024-12-05 5:52 ` Peter Wang (王信友)
@ 2024-12-05 9:07 ` Avri Altman
2 siblings, 0 replies; 4+ messages in thread
From: Avri Altman @ 2024-12-05 9:07 UTC (permalink / raw)
To: liuderong@oppo.com, alim.akhtar@samsung.com, bvanassche@acm.org,
James.Bottomley@HansenPartnership.com, martin.petersen@oracle.com,
peter.wang@mediatek.com, manivannan.sadhasivam@linaro.org,
ahalaney@redhat.com, beanhuo@micron.com, quic_mnaresh@quicinc.com
Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
>
> From: liuderong <liuderong@oppo.com>
>
> For now, lrbp->compl_time_stamp_local_clock is set to zero after send a sqe,
> but it is not updated after complete a cqe, the printed information in
> ufshcd_print_tr will always be zero.
> So update lrbp->cmpl_time_stamp_local_clock after complete a cqe.
>
> Log sample:
> ufshcd-qcom 1d84000.ufshc: UPIU[8] - issue time 8750227249 us ufshcd-qcom
> 1d84000.ufshc: UPIU[8] - complete time 0 us
Fixes tag?
I think that the commit that dropped updating it is:
c30d8d010b5e scsi: ufs: core: Prepare for completion in MCQ.
Thanks,
Avri
>
> Signed-off-by: liuderong <liuderong@oppo.com>
> ---
> drivers/ufs/core/ufshcd.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c index
> 6a26853..bd70fe1 100644
> --- a/drivers/ufs/core/ufshcd.c
> +++ b/drivers/ufs/core/ufshcd.c
> @@ -5519,6 +5519,7 @@ void ufshcd_compl_one_cqe(struct ufs_hba *hba,
> int task_tag,
>
> lrbp = &hba->lrb[task_tag];
> lrbp->compl_time_stamp = ktime_get();
> + lrbp->compl_time_stamp_local_clock = local_clock();
> cmd = lrbp->cmd;
> if (cmd) {
> if (unlikely(ufshcd_should_inform_monitor(hba, lrbp)))
> --
> 2.7.4
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-12-05 9:07 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-04 11:50 [PATCH] scsi:ufs:core: update compl_time_stamp_local_clock after complete a cqe liuderong
2024-12-04 12:50 ` Bean Huo
2024-12-05 5:52 ` Peter Wang (王信友)
2024-12-05 9:07 ` Avri Altman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox