Commit e6f3eb29 authored by Dirk Brandewie's avatar Dirk Brandewie Committed by Rafael J. Wysocki

cpufreq / intel_pstate: Fix calculation of current frequency

Use the correct pstate value to calculate the effective frequency.

References: https://bugzilla.redhat.com/show_bug.cgi?id=923942Reported-by: default avatarSatish Balay <balay@fastmail.fm>
Signed-off-by: default avatarDirk Brandewie <dirk.j.brandewie@intel.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent b563b4e3
...@@ -454,7 +454,7 @@ static inline void intel_pstate_calc_busy(struct cpudata *cpu, ...@@ -454,7 +454,7 @@ static inline void intel_pstate_calc_busy(struct cpudata *cpu,
sample->idletime_us * 100, sample->idletime_us * 100,
sample->duration_us); sample->duration_us);
core_pct = div64_u64(sample->aperf * 100, sample->mperf); core_pct = div64_u64(sample->aperf * 100, sample->mperf);
sample->freq = cpu->pstate.turbo_pstate * core_pct * 1000; sample->freq = cpu->pstate.max_pstate * core_pct * 1000;
sample->core_pct_busy = div_s64((sample->pstate_pct_busy * core_pct), sample->core_pct_busy = div_s64((sample->pstate_pct_busy * core_pct),
100); 100);
......
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