mbox series

[V2,0/2] Suspend clk scaling when there is no request

Message ID 20240627083756.25340-1-quic_rampraka@quicinc.com
Headers show
Series Suspend clk scaling when there is no request | expand

Message

Ram Prakash Gupta June 27, 2024, 8:37 a.m. UTC
Currently ufs clk scaling is getting suspended only when the
clks are scaled down, but next when high load is generated its
adding a huge amount of latency in scaling up the clk and complete
the request post that.

Now if the scaling is suspended in its existing state, and when high
load is generated it is helping improve the random performance KPI by
28%. So suspending the scaling when there is no request. And the clk
would be put in low scaled state when the actual request load is low.

Making this change as optional for other vendor by having the check
enabled using vops as for some vendor suspending without bringing the
clk in low scaled state might have impact on power consumption on the
SoC.

Changes since V1:
	- Address minor review comment.

Ram Prakash Gupta (2):
  scsi: ufs: Suspend clk scaling on no request
  scsi: ufs: qcom: Enable suspending clk scaling on no request

 drivers/ufs/core/ufshcd.c   | 3 ++-
 drivers/ufs/host/ufs-qcom.c | 2 ++
 include/ufs/ufshcd.h        | 1 +
 3 files changed, 5 insertions(+), 1 deletion(-)

Comments

Bart Van Assche June 28, 2024, 7:34 p.m. UTC | #1
On 6/27/24 1:37 AM, Ram Prakash Gupta wrote:
> Currently ufs clk scaling is getting suspended only when the
> clks are scaled down, but next when high load is generated its
> adding a huge amount of latency in scaling up the clk and complete
> the request post that.
> 
> Now if the scaling is suspended in its existing state, and when high
> load is generated it is helping improve the random performance KPI by
> 28%. So suspending the scaling when there is no request. And the clk
> would be put in low scaled state when the actual request load is low.
> 
> Making this change as optional for other vendor by having the check
> enabled using vops as for some vendor suspending without bringing the
> clk in low scaled state might have impact on power consumption on the
> SoC.

For both patches:

Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Martin K. Petersen July 5, 2024, 2:48 a.m. UTC | #2
Ram,

> Currently ufs clk scaling is getting suspended only when the clks are
> scaled down, but next when high load is generated its adding a huge
> amount of latency in scaling up the clk and complete the request post
> that.

Applied to 6.11/scsi-staging, thanks!
Martin K. Petersen July 11, 2024, 3:08 a.m. UTC | #3
On Thu, 27 Jun 2024 14:07:54 +0530, Ram Prakash Gupta wrote:

> Currently ufs clk scaling is getting suspended only when the
> clks are scaled down, but next when high load is generated its
> adding a huge amount of latency in scaling up the clk and complete
> the request post that.
> 
> Now if the scaling is suspended in its existing state, and when high
> load is generated it is helping improve the random performance KPI by
> 28%. So suspending the scaling when there is no request. And the clk
> would be put in low scaled state when the actual request load is low.
> 
> [...]

Applied to 6.11/scsi-queue, thanks!

[1/2] scsi: ufs: Suspend clk scaling on no request
      https://git.kernel.org/mkp/scsi/c/50183ac2cfb5
[2/2] scsi: ufs: qcom: Enable suspending clk scaling on no request
      https://git.kernel.org/mkp/scsi/c/ed7dac86f140