aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace
diff options
context:
space:
mode:
authorPrarit Bhargava <[email protected]>2015-11-20 18:47:56 -0500
committerRafael J. Wysocki <[email protected]>2015-11-23 23:14:10 +0100
commit8478f53946f01b8365a206ac58a2640e3e408fb2 (patch)
tree48bc2f7b6e6cda141b7685d89f3750c669c62ae0 /tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace
parentf344dae0fe9f88d3c7ec45f2d7bba84d6ce1ac00 (diff)
cpufreq: intel_pstate: Fix limits->max_policy_pct rounding error
I have a Intel (6,63) processor with a "marketing" frequency (from /proc/cpuinfo) of 2100MHz, and a max turbo frequency of 2600MHz. I can execute cpupower frequency-set -g powersave --min 1200MHz --max 2100MHz and the max_freq_pct is set to 80. When adding load to the system I noticed that the cpu frequency only reached 2000MHZ and not 2100MHz as expected. This is because limits->max_policy_pct is calculated as 2100 * 100 /2600 = 80.7 and is rounded down to 80 when it should be rounded up to 81. This patch adds a DIV_ROUND_UP() which will return the correct value. Signed-off-by: Prarit Bhargava <[email protected]> Acked-by: Srinivas Pandruvada <[email protected]> Acked-by: Viresh Kumar <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace')
0 files changed, 0 insertions, 0 deletions