All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/1] scsi: ufs: core: Apply PM QoS vote whenever the UFS clocks are on
@ 2026-12-02 10:46 Manish Pandey
  2026-12-02 10:46 ` [PATCH v2] " Manish Pandey
  0 siblings, 1 reply; 3+ messages in thread
From: Manish Pandey @ 2026-12-02 10:46 UTC (permalink / raw)
  To: James E.J. Bottomley, Martin K. Petersen,
	AngeloGioacchino Del Regno, Naveen Kumar Goud Arepalli,
	Bart Van Assche, Maramaina Naresh
  Cc: Alim Akhtar, Bean Huo, Stanley Jhu, Nitin Rawat, Peter Wang,
	linux-scsi

ufshcd_setup_clocks() applied the PM QoS vote only when clock scaling was
not supported, relying on ufshcd_scale_clks() otherwise. Since that path
only updates the vote while scaling up or down, and devfreq scaling never
toggles the clocks, a scale-down drops the vote while the clocks stay on.
The vote is not reference counted and nothing restores it, so the CPUs can
enter deep idle while a request (e.g. a Query request) is still
outstanding, which delays the completion interrupt and can lead to command
timeouts.

This series applies the PM QoS vote whenever the clocks are on and releases
it when they are gated off, so the vote is managed solely by the clock
on/off state in ufshcd_setup_clocks().

Changes in v2:
- Also drop the ufshcd_pm_qos_update() call from ufshcd_scale_clks(). In v1
  it was left in place, which would still reset the vote to
  PM_QOS_DEFAULT_VALUE on a scale-down while the clocks remained on,
  reintroducing the same window the patch aims to close.
- Expand the commit message to describe the scale-down path and note that
  the vote is now held for the whole clocks-on window instead of being
  relaxed at lower gears.

Manish Pandey (1):
  scsi: ufs: core: Apply PM QoS vote whenever the UFS clocks are on

 drivers/ufs/core/ufshcd.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-12-02 11:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-02 10:46 [PATCH v2 0/1] scsi: ufs: core: Apply PM QoS vote whenever the UFS clocks are on Manish Pandey
2026-12-02 10:46 ` [PATCH v2] " Manish Pandey
2026-12-02 11:02   ` sashiko-bot

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.