All of lore.kernel.org
 help / color / mirror / Atom feed
From: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Linux PM list <linux-pm@vger.kernel.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] cpufreq: intel_pstate: Set P-state upfront in performance mode
Date: Thu, 20 Oct 2016 11:22:44 -0700	[thread overview]
Message-ID: <1476987764.5666.29.camel@linux.intel.com> (raw)
In-Reply-To: <1724762.8Kf4o5e5cm@vostro.rjw.lan>

On Wed, 2016-10-19 at 02:57 +0200, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> 

[...]

> +	if (policy->policy == CPUFREQ_POLICY_PERFORMANCE) {
> +		/*
> +		 * NOHZ_FULL CPUs need this as the governor callback
> may not
> +		 * be invoked on them.
> +		 */
> +		intel_pstate_clear_update_util_hook(policy->cpu);
> +		intel_pstate_max_within_limits(cpu);
> +	}
> +

Can we move this to intel_pstate_set_performance_limits

diff --git a/drivers/cpufreq/intel_pstate.c
b/drivers/cpufreq/intel_pstate.c
index a6ffd79..d0fd73e 100644
--- a/drivers/cpufreq/intel_pstate.c
+++ b/drivers/cpufreq/intel_pstate.c
@@ -1543,6 +1543,13 @@ static void
intel_pstate_set_performance_limits(struct perf_limits *limits)
        limits->max_sysfs_pct = 100;
        limits->min_policy_pct = 0;
        limits->min_sysfs_pct = 0;
+
+       /*
+        * NOHZ_FULL CPUs need this as the governor callback may not
+        * be invoked on them.
+        */
+       intel_pstate_clear_update_util_hook(policy->cpu);
+       intel_pstate_max_within_limits(cpu);
 }
 
 static int intel_pstate_set_policy(struct cpufreq_policy *policy)
@@ -1599,15 +1606,6 @@ static int intel_pstate_set_policy(struct
cpufreq_policy *policy)
        limits->max_perf = round_up(limits->max_perf, FRAC_BITS);
 
  out:
-       if (policy->policy == CPUFREQ_POLICY_PERFORMANCE) {
-               /*
-                * NOHZ_FULL CPUs need this as the governor callback
may not
-                * be invoked on them.
-                */
-               intel_pstate_clear_update_util_hook(policy->cpu);
-               intel_pstate_max_within_limits(cpu);
-       }
-
        intel_pstate_set_update_util_hook(policy->cpu);
 
        intel_pstate_hwp_set_policy(policy);


Thanks,
Srinivas

  reply	other threads:[~2016-10-20 18:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-19  0:57 [PATCH] cpufreq: intel_pstate: Set P-state upfront in performance mode Rafael J. Wysocki
2016-10-20 18:22 ` Srinivas Pandruvada [this message]
2016-10-20 21:19   ` Rafael J. Wysocki
2016-10-21 15:08 ` Srinivas Pandruvada

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1476987764.5666.29.camel@linux.intel.com \
    --to=srinivas.pandruvada@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.