* [PATCH] cpufreq: intel_pstate: Ignore turbo active ratio in HWP
@ 2018-08-02 0:26 Srinivas Pandruvada
2018-08-12 11:20 ` Rafael J. Wysocki
0 siblings, 1 reply; 2+ messages in thread
From: Srinivas Pandruvada @ 2018-08-02 0:26 UTC (permalink / raw)
To: lenb, rjw, viresh.kumar; +Cc: linux-pm, linux-kernel, Srinivas Pandruvada
When HWP is active turbo active ratio is not used, so we should allow
policy max frequency above turbo activation ratio to be set. When HWP is
not active, then any policy max frequency above turbo activation ratio
can result upto max one-core turbo frequency.
This fix helps better thermal control in turbo region when other methods
like "Running Average Power Limit" is not available to use.
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
---
drivers/cpufreq/intel_pstate.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
index efb015a5f7ac..32c10e69241e 100644
--- a/drivers/cpufreq/intel_pstate.c
+++ b/drivers/cpufreq/intel_pstate.c
@@ -2020,7 +2020,8 @@ static int intel_pstate_set_policy(struct cpufreq_policy *policy)
static void intel_pstate_adjust_policy_max(struct cpufreq_policy *policy,
struct cpudata *cpu)
{
- if (cpu->pstate.max_pstate_physical > cpu->pstate.max_pstate &&
+ if (!hwp_active &&
+ cpu->pstate.max_pstate_physical > cpu->pstate.max_pstate &&
policy->max < policy->cpuinfo.max_freq &&
policy->max > cpu->pstate.max_freq) {
pr_debug("policy->max > max non turbo frequency\n");
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] cpufreq: intel_pstate: Ignore turbo active ratio in HWP
2018-08-02 0:26 [PATCH] cpufreq: intel_pstate: Ignore turbo active ratio in HWP Srinivas Pandruvada
@ 2018-08-12 11:20 ` Rafael J. Wysocki
0 siblings, 0 replies; 2+ messages in thread
From: Rafael J. Wysocki @ 2018-08-12 11:20 UTC (permalink / raw)
To: Srinivas Pandruvada; +Cc: lenb, viresh.kumar, linux-pm, linux-kernel
On Thursday, August 2, 2018 2:26:06 AM CEST Srinivas Pandruvada wrote:
> When HWP is active turbo active ratio is not used, so we should allow
> policy max frequency above turbo activation ratio to be set. When HWP is
> not active, then any policy max frequency above turbo activation ratio
> can result upto max one-core turbo frequency.
>
> This fix helps better thermal control in turbo region when other methods
> like "Running Average Power Limit" is not available to use.
>
> Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
> ---
> drivers/cpufreq/intel_pstate.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
> index efb015a5f7ac..32c10e69241e 100644
> --- a/drivers/cpufreq/intel_pstate.c
> +++ b/drivers/cpufreq/intel_pstate.c
> @@ -2020,7 +2020,8 @@ static int intel_pstate_set_policy(struct cpufreq_policy *policy)
> static void intel_pstate_adjust_policy_max(struct cpufreq_policy *policy,
> struct cpudata *cpu)
> {
> - if (cpu->pstate.max_pstate_physical > cpu->pstate.max_pstate &&
> + if (!hwp_active &&
> + cpu->pstate.max_pstate_physical > cpu->pstate.max_pstate &&
> policy->max < policy->cpuinfo.max_freq &&
> policy->max > cpu->pstate.max_freq) {
> pr_debug("policy->max > max non turbo frequency\n");
>
Applied, thanks!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-08-12 11:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-02 0:26 [PATCH] cpufreq: intel_pstate: Ignore turbo active ratio in HWP Srinivas Pandruvada
2018-08-12 11:20 ` Rafael J. Wysocki
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).