intel_pstate: Do not skip samples partially
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 10 Mar 2016 22:45:19 +0000 (23:45 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 10 Mar 2016 23:07:51 +0000 (00:07 +0100)
commit4fec7ad5f637159525265a45f66482cf8817b45f
tree6896e57cde6e27fb66acdce735255b184f512a0d
parent8fa520af50817d5f30d293f507c937f561b3e6b9
intel_pstate: Do not skip samples partially

If the current value of MPERF or the current value of TSC is the
same as the previous one, respectively, intel_pstate_sample() bails
out early and skips the sample.

However, intel_pstate_adjust_busy_pstate() is still called in that
case which is not correct, so modify intel_pstate_sample() to
return a bool value indicating whether or not the sample has been
taken and use it to decide whether or not to call
intel_pstate_adjust_busy_pstate().

While at it, remove redundant parentheses from the MPERF/TSC
check in intel_pstate_sample().

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
drivers/cpufreq/intel_pstate.c
This page took 0.02494 seconds and 5 git commands to generate.