* [PATCH] scsi: ufs: core: Add compl_time_stamp_local_clock assignment
@ 2023-11-01 7:14 Zhe Wang
2023-11-01 16:43 ` Bart Van Assche
0 siblings, 1 reply; 3+ messages in thread
From: Zhe Wang @ 2023-11-01 7:14 UTC (permalink / raw)
To: martin.petersen, jejb, bvanassche, alim.akhtar, avri.altman,
quic_asutoshd
Cc: linux-scsi, orsonzhai, yuelin.tang, zhenxiong.lai, zhang.lyra,
zhewang116
The compl_time_stamp_local_clock assignment seems to have been
accidentally deleted in the previous patch, so it needs to be added
again for debugging needs.
Fixes: c30d8d010b5e ("scsi: ufs: core: Prepare for completion in MCQ")
Signed-off-by: Zhe Wang <zhe.wang1@unisoc.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 8382e8cfa414..b35977fa931f 100644
--- a/drivers/ufs/core/ufshcd.c
+++ b/drivers/ufs/core/ufshcd.c
@@ -5388,6 +5388,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.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] scsi: ufs: core: Add compl_time_stamp_local_clock assignment
2023-11-01 7:14 [PATCH] scsi: ufs: core: Add compl_time_stamp_local_clock assignment Zhe Wang
@ 2023-11-01 16:43 ` Bart Van Assche
2023-11-02 7:59 ` Zhe Wang
0 siblings, 1 reply; 3+ messages in thread
From: Bart Van Assche @ 2023-11-01 16:43 UTC (permalink / raw)
To: Zhe Wang, martin.petersen, jejb, alim.akhtar, avri.altman,
quic_asutoshd
Cc: linux-scsi, orsonzhai, yuelin.tang, zhenxiong.lai, zhang.lyra,
zhewang116
On 11/1/23 00:14, Zhe Wang wrote:
> The compl_time_stamp_local_clock assignment seems to have been
> accidentally deleted in the previous patch, so it needs to be added
> again for debugging needs.
>
> Fixes: c30d8d010b5e ("scsi: ufs: core: Prepare for completion in MCQ")
> Signed-off-by: Zhe Wang <zhe.wang1@unisoc.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 8382e8cfa414..b35977fa931f 100644
> --- a/drivers/ufs/core/ufshcd.c
> +++ b/drivers/ufs/core/ufshcd.c
> @@ -5388,6 +5388,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)))
Is anyone using the data tracked in compl_time_stamp /
compl_time_stamp_local_clock? I'm wondering whether the code for
tracking command duration can be removed. Otherwise the above patch
looks fine to me.
Thanks,
Bart.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] scsi: ufs: core: Add compl_time_stamp_local_clock assignment
2023-11-01 16:43 ` Bart Van Assche
@ 2023-11-02 7:59 ` Zhe Wang
0 siblings, 0 replies; 3+ messages in thread
From: Zhe Wang @ 2023-11-02 7:59 UTC (permalink / raw)
To: Bart Van Assche
Cc: Zhe Wang, martin.petersen, jejb, alim.akhtar, avri.altman,
quic_asutoshd, linux-scsi, orsonzhai, yuelin.tang, zhenxiong.lai,
zhang.lyra
Hi Bart
On Thu, Nov 2, 2023 at 12:43 AM Bart Van Assche <bvanassche@acm.org> wrote:
>
>
> On 11/1/23 00:14, Zhe Wang wrote:
> > The compl_time_stamp_local_clock assignment seems to have been
> > accidentally deleted in the previous patch, so it needs to be added
> > again for debugging needs.
> >
> > Fixes: c30d8d010b5e ("scsi: ufs: core: Prepare for completion in MCQ")
> > Signed-off-by: Zhe Wang <zhe.wang1@unisoc.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 8382e8cfa414..b35977fa931f 100644
> > --- a/drivers/ufs/core/ufshcd.c
> > +++ b/drivers/ufs/core/ufshcd.c
> > @@ -5388,6 +5388,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)))
>
> Is anyone using the data tracked in compl_time_stamp /
> compl_time_stamp_local_clock? I'm wondering whether the code for
> tracking command duration can be removed. Otherwise the above patch
> looks fine to me.
>
> Thanks,
>
> Bart.
'compl_time_stamp_local_clock' can correspond to the timestamp of
dmesg entries or other timestamps used by the UFS driver, such as
'tstamp' in 'struct ufs_event_hist'. The timestamp that can be
correlated with each other can be easily combined to record the
sequence of command execution for analyzing problem scenarios, so I
think it is quite useful.
Thanks,
Zhe.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-11-02 8:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-01 7:14 [PATCH] scsi: ufs: core: Add compl_time_stamp_local_clock assignment Zhe Wang
2023-11-01 16:43 ` Bart Van Assche
2023-11-02 7:59 ` Zhe Wang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox