]> git.baikalelectronics.ru Git - kernel.git/commit
cpufreq: intel_pstate: Reduce impact due to rounding error
authorSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Tue, 25 Oct 2016 20:20:41 +0000 (13:20 -0700)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 1 Nov 2016 05:04:06 +0000 (06:04 +0100)
commitf21b5f9b87172dbd72906352aa1fe311023645e1
tree28bf92f4d5ecca835c031e05e731f303ef988ef7
parent779780fd86f6f5303622b47bd6da7fb6ea3c8190
cpufreq: intel_pstate: Reduce impact due to rounding error

When policy->max and policy->min are same, in some cases they don't
result in the same frequency cap. The max_policy_pct is rounded up but
not min_perf_pct. So even when they are same, results in different
percentage or maximum and minimum.
Since minimum is a conservative value for power, a lower value without
rounding is better in most of the cases, unless user wants
policy->max = policy->min.
This change uses use the same policy percentage when policy->max and
policy->min are same.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/intel_pstate.c