Commit fab24dcc authored by Rafael J. Wysocki's avatar Rafael J. Wysocki

cpufreq: intel_pstate: Clean up after performance governor changes

After commit 82b4e03e (intel_pstate: skip scheduler hook when in
"performance" mode) get_target_pstate_use_performance() and
get_target_pstate_use_cpu_load() are never called if scaling_governor
is "performance", so drop the CPUFREQ_POLICY_PERFORMANCE checks from
them as they will never trigger anyway.

Moreover, the documentation needs to be updated to reflect the change
made by the above commit, so do that too.
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: default avatarSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
parent 82b4e03e
...@@ -157,10 +157,8 @@ Without HWP, this P-state selection algorithm is always the same regardless of ...@@ -157,10 +157,8 @@ Without HWP, this P-state selection algorithm is always the same regardless of
the processor model and platform configuration. the processor model and platform configuration.
It selects the maximum P-state it is allowed to use, subject to limits set via It selects the maximum P-state it is allowed to use, subject to limits set via
``sysfs``, every time the P-state selection computations are carried out by the ``sysfs``, every time the driver configuration for the given CPU is updated
driver's utilization update callback for the given CPU (that does not happen (e.g. via ``sysfs``).
more often than every 10 ms), but the hardware configuration will not be changed
if the new P-state is the same as the current one.
This is the default P-state selection algorithm if the This is the default P-state selection algorithm if the
:c:macro:`CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE` kernel configuration option :c:macro:`CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE` kernel configuration option
......
...@@ -1620,9 +1620,6 @@ static inline int32_t get_target_pstate_use_cpu_load(struct cpudata *cpu) ...@@ -1620,9 +1620,6 @@ static inline int32_t get_target_pstate_use_cpu_load(struct cpudata *cpu)
int32_t busy_frac, boost; int32_t busy_frac, boost;
int target, avg_pstate; int target, avg_pstate;
if (cpu->policy == CPUFREQ_POLICY_PERFORMANCE)
return cpu->pstate.turbo_pstate;
busy_frac = div_fp(sample->mperf, sample->tsc); busy_frac = div_fp(sample->mperf, sample->tsc);
boost = cpu->iowait_boost; boost = cpu->iowait_boost;
...@@ -1659,9 +1656,6 @@ static inline int32_t get_target_pstate_use_performance(struct cpudata *cpu) ...@@ -1659,9 +1656,6 @@ static inline int32_t get_target_pstate_use_performance(struct cpudata *cpu)
int32_t perf_scaled, max_pstate, current_pstate, sample_ratio; int32_t perf_scaled, max_pstate, current_pstate, sample_ratio;
u64 duration_ns; u64 duration_ns;
if (cpu->policy == CPUFREQ_POLICY_PERFORMANCE)
return cpu->pstate.turbo_pstate;
/* /*
* perf_scaled is the ratio of the average P-state during the last * perf_scaled is the ratio of the average P-state during the last
* sampling period to the P-state requested last time (in percent). * sampling period to the P-state requested last time (in percent).
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment