diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2017-03-28 00:10:47 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2017-03-28 23:12:14 +0200 |
commit | 7aec5b50e97dd3e2e6ad8a87ccfd62ba8f49a105 (patch) | |
tree | 0535175237f60243c3e1e63f8681cf99e9509d04 /drivers/cpufreq | |
parent | ff35f02ea1e3ac4e774f2784c1444fba4cf8e16a (diff) | |
download | lwn-7aec5b50e97dd3e2e6ad8a87ccfd62ba8f49a105.tar.gz lwn-7aec5b50e97dd3e2e6ad8a87ccfd62ba8f49a105.zip |
cpufreq: intel_pstate: Set HWP sampling interval once
In the HWP enabled case pid_params.sample_rate_ns only needs to be
updated once, because it is global, so do that when setting hwp_active
instead of doing it during the initialization of every CPU.
Moreover, pid_params.sample_rate_ms is never used if HWP is enabled,
so do not update it at all then.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/cpufreq')
-rw-r--r-- | drivers/cpufreq/intel_pstate.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c index 5585a2d101a7..b631ab02f170 100644 --- a/drivers/cpufreq/intel_pstate.c +++ b/drivers/cpufreq/intel_pstate.c @@ -1911,8 +1911,6 @@ static int intel_pstate_init_cpu(unsigned int cpunum) intel_pstate_disable_ee(cpunum); intel_pstate_hwp_enable(cpu); - pid_params.sample_rate_ms = 50; - pid_params.sample_rate_ns = 50 * NSEC_PER_MSEC; } intel_pstate_get_cpu_pstates(cpu); @@ -2563,6 +2561,7 @@ static int __init intel_pstate_init(void) } else { hwp_active++; intel_pstate.attr = hwp_cpufreq_attrs; + pid_params.sample_rate_ns = 50 * NSEC_PER_MSEC; goto hwp_cpu_matched; } } else { |