Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1505175
| From | Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] cpufreq: intel_pstate: Set P-state upfront in performance mode |
| Date | 2016-10-20 20:30 +0200 |
| Message-ID | <suqgi-2Md-29@gated-at.bofh.it> (permalink) |
| References | <stNoB-1Cu-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] cpufreq: intel_pstate: Set P-state upfront in performance mode "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-10-19 03:00 +0200
Re: [PATCH] cpufreq: intel_pstate: Set P-state upfront in performance mode Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> - 2016-10-20 20:30 +0200
Re: [PATCH] cpufreq: intel_pstate: Set P-state upfront in performance mode "Rafael J. Wysocki" <rafael@kernel.org> - 2016-10-20 23:30 +0200
Re: [PATCH] cpufreq: intel_pstate: Set P-state upfront in performance mode Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> - 2016-10-21 17:20 +0200
csiph-web