2020-03-30 23:21:11

by Dmitry Osipenko

[permalink] [raw]
Subject: [PATCH v1 5/5] PM / devfreq: tegra30: Make CPUFreq notifier to take into account boosting

MCCPU frequency boosting needs to be taken into account in order to avoid
scheduling of unnecessary devfreq updates.

Signed-off-by: Dmitry Osipenko <[email protected]>
---
drivers/devfreq/tegra30-devfreq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/devfreq/tegra30-devfreq.c b/drivers/devfreq/tegra30-devfreq.c
index 34f6291e880c..3b57aac9894c 100644
--- a/drivers/devfreq/tegra30-devfreq.c
+++ b/drivers/devfreq/tegra30-devfreq.c
@@ -420,7 +420,7 @@ tegra_actmon_cpufreq_contribution(struct tegra_devfreq *tegra,

static_cpu_emc_freq = actmon_cpu_to_emc_rate(tegra, cpu_freq);

- if (dev_freq >= static_cpu_emc_freq)
+ if (dev_freq + actmon_dev->boost_freq >= static_cpu_emc_freq)
return 0;

return static_cpu_emc_freq;
--
2.25.1


2020-03-31 23:22:03

by Chanwoo Choi

[permalink] [raw]
Subject: Re: [PATCH v1 5/5] PM / devfreq: tegra30: Make CPUFreq notifier to take into account boosting

Hi Dmitry,

On 3/31/20 8:16 AM, Dmitry Osipenko wrote:
> MCCPU frequency boosting needs to be taken into account in order to avoid
> scheduling of unnecessary devfreq updates.

"in order to avoid scheduling of unnecessary devfreq updates."
I don't understand the correct meaning of following description.
Could you explain it more detailed?

>
> Signed-off-by: Dmitry Osipenko <[email protected]>
> ---
> drivers/devfreq/tegra30-devfreq.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/devfreq/tegra30-devfreq.c b/drivers/devfreq/tegra30-devfreq.c
> index 34f6291e880c..3b57aac9894c 100644
> --- a/drivers/devfreq/tegra30-devfreq.c
> +++ b/drivers/devfreq/tegra30-devfreq.c
> @@ -420,7 +420,7 @@ tegra_actmon_cpufreq_contribution(struct tegra_devfreq *tegra,
>
> static_cpu_emc_freq = actmon_cpu_to_emc_rate(tegra, cpu_freq);
>
> - if (dev_freq >= static_cpu_emc_freq)
> + if (dev_freq + actmon_dev->boost_freq >= static_cpu_emc_freq)
> return 0;
>
> return static_cpu_emc_freq;
>


--
Best Regards,
Chanwoo Choi
Samsung Electronics

2020-04-01 18:55:29

by Dmitry Osipenko

[permalink] [raw]
Subject: Re: [PATCH v1 5/5] PM / devfreq: tegra30: Make CPUFreq notifier to take into account boosting

01.04.2020 02:29, Chanwoo Choi пишет:
> Hi Dmitry,
>
> On 3/31/20 8:16 AM, Dmitry Osipenko wrote:
>> MCCPU frequency boosting needs to be taken into account in order to avoid
>> scheduling of unnecessary devfreq updates.
>
> "in order to avoid scheduling of unnecessary devfreq updates."
> I don't understand the correct meaning of following description.
> Could you explain it more detailed?

Hello Chanwoo,

I'll update the commit message with a more detailed description and make
this patch standalone in v2. Thank you very much for taking a look at
the patches.

BTW, please also take a look at this patch
https://patchwork.kernel.org/patch/11409037/