cpufreq: intel_pstate: Use different utilization update callbacks
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 27 Mar 2017 22:15:37 +0000 (00:15 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 28 Mar 2017 21:12:15 +0000 (23:12 +0200)
commiteabd22c657f1d23c714f536b859a22a0f22ac7f5
tree7b62cee152d25842db63f82ee47c4b61d576bbcf
parent0042b2c0692ade097ef3a6bbffa491da5dc89273
cpufreq: intel_pstate: Use different utilization update callbacks

Notice that some overhead in the utilization update callbacks
registered by intel_pstate in the active mode can be avoided if
those callbacks are tailored to specific configurations of the
driver.  For example, the utilization update callback for the HWP
enabled case only needs to update the average CPU performance
periodically whereas the utilization update callback for the
PID-based algorithm does not need to take IO-wait boosting into
account and so on.

With that in mind, define three utilization update callbacks for
three different use cases: HWP enabled, the CPU load "powersave"
P-state selection algorithm and the PID-based "powersave" P-state
selection algorithm and modify the driver initialization to
choose the callback matching its current configuration.

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