linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V2] scsi: ufs: ufs-qcom: Update UFS devfreq Parameters
@ 2023-07-16  7:49 Nitin Rawat
  2023-07-20  8:26 ` Manivannan Sadhasivam
  0 siblings, 1 reply; 2+ messages in thread
From: Nitin Rawat @ 2023-07-16  7:49 UTC (permalink / raw)
  To: mani, quic_cang, stanley.chu, bvanassche, quic_asutoshd,
	avri.altman, martin.petersen, beanhuo, konrad.dybcio
  Cc: linux-scsi, linux-kernel, agross, andersson, jejb, linux-arm-msm,
	quic_ziqichen, Nitin Rawat

To support the periodic polling mode without stop caused by CPU idle
state, enable delayed timer as default instead of deferrable timer
for qualcomm platforms.
And change UFS devfreq downdifferential threshold to 65 for less
aggressive downscaling.

Signed-off-by: Nitin Rawat <quic_nitirawa@quicinc.com>
Signed-off-by: Asutosh Das <quic_asutoshd@quicinc.com>
---

Changes in v2:
- Realigned the commit text

 drivers/ufs/host/ufs-qcom.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/ufs/host/ufs-qcom.c b/drivers/ufs/host/ufs-qcom.c
index 82d02e7f3b4f..a15815c951ca 100644
--- a/drivers/ufs/host/ufs-qcom.c
+++ b/drivers/ufs/host/ufs-qcom.c
@@ -1388,8 +1388,9 @@ static void ufs_qcom_config_scaling_param(struct ufs_hba *hba,
 					struct devfreq_simple_ondemand_data *d)
 {
 	p->polling_ms = 60;
+	p->timer = DEVFREQ_TIMER_DELAYED;
 	d->upthreshold = 70;
-	d->downdifferential = 5;
+	d->downdifferential = 65;
 }
 #else
 static void ufs_qcom_config_scaling_param(struct ufs_hba *hba,
--
2.17.1


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

* Re: [PATCH V2] scsi: ufs: ufs-qcom: Update UFS devfreq Parameters
  2023-07-16  7:49 [PATCH V2] scsi: ufs: ufs-qcom: Update UFS devfreq Parameters Nitin Rawat
@ 2023-07-20  8:26 ` Manivannan Sadhasivam
  0 siblings, 0 replies; 2+ messages in thread
From: Manivannan Sadhasivam @ 2023-07-20  8:26 UTC (permalink / raw)
  To: Nitin Rawat
  Cc: quic_cang, stanley.chu, bvanassche, quic_asutoshd, avri.altman,
	martin.petersen, beanhuo, konrad.dybcio, linux-scsi, linux-kernel,
	agross, andersson, jejb, linux-arm-msm, quic_ziqichen

On Sun, Jul 16, 2023 at 01:19:07PM +0530, Nitin Rawat wrote:
> To support the periodic polling mode without stop caused by CPU idle
> state, enable delayed timer as default instead of deferrable timer
> for qualcomm platforms.

How about,

"Devfreq uses the default DEVFREQ_TIMER_DEFERRABLE mode which uses the deferred
timer for scheduling the devfreq load monitor function. This causes the load
monitoring to be done only with non-idle CPUs and not making use of the idle
CPUs. Hence, use the DEVFREQ_TIMER_DELAYED mode which uses the delayed timer
thereby making use of idle CPUs as well for load monitoring."

> And change UFS devfreq downdifferential threshold to 65 for less
> aggressive downscaling.
> 

This change needs to be done in a separate patch. Also please provide any
benchmark if available to justify the patch.

> Signed-off-by: Nitin Rawat <quic_nitirawa@quicinc.com>
> Signed-off-by: Asutosh Das <quic_asutoshd@quicinc.com>

Your signed-off-by should come last, as you are the one sending this patch.

- Mani

> ---
> 
> Changes in v2:
> - Realigned the commit text
> 
>  drivers/ufs/host/ufs-qcom.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/ufs/host/ufs-qcom.c b/drivers/ufs/host/ufs-qcom.c
> index 82d02e7f3b4f..a15815c951ca 100644
> --- a/drivers/ufs/host/ufs-qcom.c
> +++ b/drivers/ufs/host/ufs-qcom.c
> @@ -1388,8 +1388,9 @@ static void ufs_qcom_config_scaling_param(struct ufs_hba *hba,
>  					struct devfreq_simple_ondemand_data *d)
>  {
>  	p->polling_ms = 60;
> +	p->timer = DEVFREQ_TIMER_DELAYED;
>  	d->upthreshold = 70;
> -	d->downdifferential = 5;
> +	d->downdifferential = 65;
>  }
>  #else
>  static void ufs_qcom_config_scaling_param(struct ufs_hba *hba,
> --
> 2.17.1
> 

-- 
மணிவண்ணன் சதாசிவம்

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

end of thread, other threads:[~2023-07-20  8:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-16  7:49 [PATCH V2] scsi: ufs: ufs-qcom: Update UFS devfreq Parameters Nitin Rawat
2023-07-20  8:26 ` Manivannan Sadhasivam

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).