diff options
author | Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> | 2017-06-13 02:30:27 +0300 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2017-06-24 02:48:12 +0300 |
commit | 1a4fe38add8be45eb3873ad756561b9baf6bcaef (patch) | |
tree | 155752da5d5b41c954241d91470831920415902f /arch/x86 | |
parent | 51204e0639c49ada02fd823782ad673b6326d748 (diff) | |
download | linux-1a4fe38add8be45eb3873ad756561b9baf6bcaef.tar.xz |
cpufreq: intel_pstate: Remove max/min fractions to limit performance
In the current model the max/min perf limits are a fraction of current
user space limits to the allowed max_freq or 100% for global limits.
This results in wrong ratio limits calculation because of rounding
issues for some user space limits.
Initially we tried to solve this issue by issue by having more shift
bits to increase precision. Still there are isolated cases where we still
have error.
This can be avoided by using ratios all together. Since the way we get
cpuinfo.max_freq is by multiplying scaling factor to max ratio, we can
easily keep the max/min ratios in terms of ratios and not fractions.
For example:
if the max ratio = 36
cpuinfo.max_freq = 36 * 100000 = 3600000
Suppose user space sets a limit of 1200000, then we can calculate
max ratio limit as
= 36 * 1200000 / 3600000
= 12
This will be correct for any user limits.
The other advantage is that, we don't need to do any calculation in the
fast path as ratio limit is already calculated via set_policy() callback.
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'arch/x86')
0 files changed, 0 insertions, 0 deletions