From: sashiko-bot@kernel.org
To: "Manish Pandey" <manish.pandey@oss.qualcomm.com>
Cc: linux-scsi@vger.kernel.org
Subject: Re: [PATCH 1/1] scsi: ufs: core: Apply PM QoS vote whenever the UFS clocks are on
Date: Wed, 02 Dec 2026 10:01:39 +0000 [thread overview]
Message-ID: <sashiko-outbox-245375@kernel.org> (raw)
In-Reply-To: <20261202094649.1287449-2-manish.pandey@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 2 potential
issues to consider:
- [Medium] scsi: ufs: core: ufshcd_scale_clks() drops PM QoS vote while
clocks are on
- [Low] scsi: ufs: core: missing Fixes trailer for commit 2777e73fc154
--
commit 57c74ecf3e797dd602e3162e1e7c9e94eaccbdc9
Author: Manish Pandey <manish.pandey@oss.qualcomm.com>
> scsi: ufs: core: Apply PM QoS vote whenever the UFS clocks are on
>
> ufshcd_setup_clocks() applied the PM QoS vote only when clock scaling was
> not supported, relying on ufshcd_scale_clks() otherwise. But that only
> updates the vote while scaling up or down, so on clock-scaling capable
> controllers the vote is not held across the whole time the controller is
> active.
>
> Without the vote, the CPUs can enter deep idle while a request (e.g. a
> Query request) is still outstanding, delaying the completion interrupt and
> causing command timeouts.
>
> Drop the ufshcd_is_clkscaling_supported() check so the PM QoS vote is
> applied whenever the clocks are on and released when they are gated off,
> regardless of clock scaling support.
>
> Signed-off-by: Manish Pandey <manish.pandey@oss.qualcomm.com>
[Severity: Low]
Should this include a Fixes: tag for the commit that gated the PM QoS vote
on !ufshcd_is_clkscaling_supported(hba):
Fixes: 2777e73fc154 ("scsi: ufs: core: Add CPU latency QoS support for UFS driver")
> diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
> index 7d0e60e073029..881de0dac4eff 100644
> --- a/drivers/ufs/core/ufshcd.c
> +++ b/drivers/ufs/core/ufshcd.c
> @@ -9964,8 +9964,8 @@ static int ufshcd_setup_clocks(struct ufs_hba *hba, bool on)
> if (ret)
> return ret;
>
> - if (!ufshcd_is_clkscaling_supported(hba))
> - ufshcd_pm_qos_update(hba, on);
> + /* Hold the PM QoS vote while the controller is active to keep CPUs out of deep idle. */
> + ufshcd_pm_qos_update(hba, on);
[Severity: Medium]
Does ufshcd_scale_clks() still drop hba->pm_qos_req while the clocks are
on?
ufshcd_scale_clks() still calls ufshcd_pm_qos_update(hba, scale_up), and
ufshcd_pm_qos_update() is not reference-counted. When devfreq scales the
clocks down (scale_up == false), it sets hba->pm_qos_req back to
PM_QOS_DEFAULT_VALUE while the clocks remain enabled.
Requests issued while the clocks are already in CLKS_ON (or when
ufshcd_hold() cancels gate_work in REQ_CLKS_OFF) do not call
ufshcd_setup_clocks(hba, true) to restore the vote, and Query requests
(such as the WriteBooster toggle in ufshcd_clock_scaling_unprepare() right
after scaling down) do not call ufshcd_clk_scaling_start_busy() to trigger
a scale-up, leaving CPUs able to enter deep idle while requests are
outstanding. Should the ufshcd_pm_qos_update() call in
ufshcd_scale_clks() be removed so the vote is managed solely by
ufshcd_setup_clocks()?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261202094649.1287449-1-manish.pandey@oss.qualcomm.com?part=1
prev parent reply other threads:[~2026-12-02 10:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-02 9:46 [PATCH 0/1] scsi: ufs: core: Apply PM QoS vote whenever the UFS clocks are on Manish Pandey
2026-12-02 9:46 ` [PATCH 1/1] " Manish Pandey
2026-12-02 10:01 ` sashiko-bot [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=sashiko-outbox-245375@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=manish.pandey@oss.qualcomm.com \
--cc=sashiko-reviews@lists.linux.dev \
/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.