From: Subhash Jadavani <subhashj@codeaurora.org>
To: Zang Leigang <zangleigang@hisilicon.com>
Cc: vinholikatti@gmail.com, jejb@linux.vnet.ibm.com,
martin.petersen@oracle.com, linux-scsi@vger.kernel.org,
linux-scsi-owner@vger.kernel.org
Subject: Re: [PATCH] scsi: ufs: add ufs a command complete time stamp
Date: Wed, 27 Sep 2017 17:42:59 -0700 [thread overview]
Message-ID: <2061f5bb37d8a194daaca79bff3b94d3@codeaurora.org> (raw)
In-Reply-To: <20170927020606.12151-1-zangleigang@hisilicon.com>
On 2017-09-26 19:06, Zang Leigang wrote:
> Signed-off-by: Zang Leigang <zangleigang@hisilicon.com>
>
> diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
> index 794a460..7e8d583 100644
> --- a/drivers/scsi/ufs/ufshcd.c
> +++ b/drivers/scsi/ufs/ufshcd.c
> @@ -385,6 +385,8 @@ void ufshcd_print_trs(struct ufs_hba *hba,
> unsigned long bitmap, bool pr_prdt)
>
> dev_err(hba->dev, "UPIU[%d] - issue time %lld us\n",
> tag, ktime_to_us(lrbp->issue_time_stamp));
> + dev_err(hba->dev, "UPIU[%d] - complete time %lld us\n",
> + tag, ktime_to_us(lrbp->compl_time_stamp));
> dev_err(hba->dev,
> "UPIU[%d] - Transfer Request Descriptor phys@0x%llx\n",
> tag, (u64)lrbp->utrd_dma_addr);
> @@ -1746,6 +1748,7 @@ static inline
> void ufshcd_send_command(struct ufs_hba *hba, unsigned int task_tag)
> {
> hba->lrb[task_tag].issue_time_stamp = ktime_get();
> + hba->lrb[task_tag].compl_time_stamp = ktime_set(0, 0);
> ufshcd_clk_scaling_start_busy(hba);
> __set_bit(task_tag, &hba->outstanding_reqs);
> ufshcd_writel(hba, 1 << task_tag, REG_UTP_TRANSFER_REQ_DOOR_BELL);
> @@ -4627,6 +4630,8 @@ static void __ufshcd_transfer_req_compl(struct
> ufs_hba *hba,
> }
> if (ufshcd_is_clkscaling_supported(hba))
> hba->clk_scaling.active_reqs--;
> +
> + lrbp->compl_time_stamp = ktime_get();
> }
>
> /* clear corresponding bits of completed commands */
> diff --git a/drivers/scsi/ufs/ufshcd.h b/drivers/scsi/ufs/ufshcd.h
> index cdc8bd0..40ea475 100644
> --- a/drivers/scsi/ufs/ufshcd.h
> +++ b/drivers/scsi/ufs/ufshcd.h
> @@ -166,6 +166,7 @@ struct ufs_pm_lvl_states {
> * @lun: LUN of the command
> * @intr_cmd: Interrupt command (doesn't participate in interrupt
> aggregation)
> * @issue_time_stamp: time stamp for debug purposes
> + * @compl_time_stamp: time stamp for statistics
> * @req_abort_skip: skip request abort task flag
> */
> struct ufshcd_lrb {
> @@ -189,6 +190,7 @@ struct ufshcd_lrb {
> u8 lun; /* UPIU LUN id field is only 8-bit wide */
> bool intr_cmd;
> ktime_t issue_time_stamp;
> + ktime_t compl_time_stamp;
>
> bool req_abort_skip;
> };
Looks good to me.
Reviewed-by: Subhash Jadavani <subhashj@codeaurora.org>
--
The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
next prev parent reply other threads:[~2017-09-28 0:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-27 2:06 [PATCH] scsi: ufs: add ufs a command complete time stamp Zang Leigang
2017-09-28 0:42 ` Subhash Jadavani [this message]
2017-09-28 1:44 ` Martin K. Petersen
-- strict thread matches above, loose matches on Subject: below --
2017-09-20 10:30 Zang Leigang
2017-09-26 21:39 ` Subhash Jadavani
2017-09-27 3:21 ` Zang Leigang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2061f5bb37d8a194daaca79bff3b94d3@codeaurora.org \
--to=subhashj@codeaurora.org \
--cc=jejb@linux.vnet.ibm.com \
--cc=linux-scsi-owner@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=vinholikatti@gmail.com \
--cc=zangleigang@hisilicon.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.