]> git.baikalelectronics.ru Git - kernel.git/commit
intel_pstate: Clarify average performance computation
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 11 May 2016 17:09:12 +0000 (19:09 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 11 May 2016 20:58:37 +0000 (22:58 +0200)
commit70e6c97eaa2ac10ee980ae37d9e16429d281ba58
treeeb79c9d93b6ea5a5358153dfa492445f35b5d90d
parent15cb00a45be56fe0ed354ad2c527e08c7839cdc3
intel_pstate: Clarify average performance computation

The core_pct_busy field of struct sample actually contains the
average performace during the last sampling period (in percent)
and not the utilization of the core as suggested by its name
which is confusing.

For this reason, change the name of that field to core_avg_perf
and rename the function that computes its value accordingly.

Also notice that storing this value as percentage requires a costly
integer multiplication to be carried out in a hot path, so instead
store it as an "extended fixed point" value with more fraction bits
and update the code using it accordingly (it is better to change the
name of the field along with its meaning in one go than to make those
two changes separately, as that would likely lead to more
confusion).

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