From: Manivannan Sadhasivam <mani@kernel.org>
To: Asutosh Das <quic_asutoshd@quicinc.com>
Cc: quic_cang@quicinc.com, martin.petersen@oracle.com,
linux-scsi@vger.kernel.org, quic_nguyenb@quicinc.com,
quic_xiaosenh@quicinc.com, stanley.chu@mediatek.com,
adrian.hunter@intel.com, bvanassche@acm.org, avri.altman@wdc.com,
beanhuo@micron.com, linux-arm-msm@vger.kernel.org,
Alim Akhtar <alim.akhtar@samsung.com>,
"James E.J. Bottomley" <jejb@linux.ibm.com>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v1 1/1] scsi: ufs: mcq: Use active_reqs to check busy in clock scaling
Date: Wed, 8 Mar 2023 11:12:53 +0530 [thread overview]
Message-ID: <20230308054253.GD5124@thinkpad> (raw)
In-Reply-To: <e8d303eff0713a3e5f3c3725cdf6e5c5d3de2b01.1678244386.git.quic_asutoshd@quicinc.com>
On Tue, Mar 07, 2023 at 07:00:09PM -0800, Asutosh Das wrote:
> Multi Circular Queue doesn't use outstanding_reqs.
> But the ufs clock scaling functions use outstanding_reqs to
> determine if there're requests pending. When MCQ is enabled
> this check always returns false.
>
> Hence use active_reqs to check if there're pending requests.
>
> Signed-off-by: Asutosh Das <quic_asutoshd@quicinc.com>
This looks like a fix to me. Hence there should be a fixes tag. With that,
Reviewed-by: Manivannan Sadhasivam <mani@kernel.org>
Thanks,
Mani
> ---
> drivers/ufs/core/ufshcd.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
> index 172d25fef740..c6b35123c83b 100644
> --- a/drivers/ufs/core/ufshcd.c
> +++ b/drivers/ufs/core/ufshcd.c
> @@ -1500,7 +1500,7 @@ static int ufshcd_devfreq_get_dev_status(struct device *dev,
> scaling->window_start_t = curr_t;
> scaling->tot_busy_t = 0;
>
> - if (hba->outstanding_reqs) {
> + if (scaling->active_reqs) {
> scaling->busy_start_t = curr_t;
> scaling->is_busy_started = true;
> } else {
> @@ -2118,7 +2118,7 @@ static void ufshcd_clk_scaling_update_busy(struct ufs_hba *hba)
>
> spin_lock_irqsave(hba->host->host_lock, flags);
> hba->clk_scaling.active_reqs--;
> - if (!hba->outstanding_reqs && scaling->is_busy_started) {
> + if (!scaling->active_reqs && scaling->is_busy_started) {
> scaling->tot_busy_t += ktime_to_us(ktime_sub(ktime_get(),
> scaling->busy_start_t));
> scaling->busy_start_t = 0;
> --
> 2.7.4
>
--
மணிவண்ணன் சதாசிவம்
prev parent reply other threads:[~2023-03-08 5:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-08 3:00 [PATCH v1 1/1] scsi: ufs: mcq: Use active_reqs to check busy in clock scaling Asutosh Das
2023-03-08 5:42 ` Manivannan Sadhasivam [this message]
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=20230308054253.GD5124@thinkpad \
--to=mani@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=alim.akhtar@samsung.com \
--cc=avri.altman@wdc.com \
--cc=beanhuo@micron.com \
--cc=bvanassche@acm.org \
--cc=jejb@linux.ibm.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=quic_asutoshd@quicinc.com \
--cc=quic_cang@quicinc.com \
--cc=quic_nguyenb@quicinc.com \
--cc=quic_xiaosenh@quicinc.com \
--cc=stanley.chu@mediatek.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.