]> git.karo-electronics.de Git - karo-tx-linux.git/commit
cpufreq: Add a mechanism for registering utilization update callbacks
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 29 Jan 2016 22:53:50 +0000 (23:53 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 9 Feb 2016 20:31:47 +0000 (21:31 +0100)
commit72d1410db9681024c583e44ee2e581370387cf9f
treedc6ef604877d011ef5225fdf46005cb8de1d1f86
parentc89f2682a39192433c296bf97b834fd2815a758b
cpufreq: Add a mechanism for registering utilization update callbacks

Introduce a mechanism by which parts of the cpufreq subsystem
("setpolicy" drivers or the core) can register callbacks to be
executed from cpufreq_update_util() which is invoked by the
scheduler's update_load_avg() on CPU utilization changes.

This allows the "setpolicy" drivers to dispense with their timers
and do all of the computations they need and frequency/voltage
adjustments in the update_load_avg() code path, among other things.

The scheduler changes were suggested by Peter Zijlstra.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Tested-by: Gautham R. Shenoy <ego@linux.vnet.ibm.com>
drivers/cpufreq/cpufreq.c
include/linux/cpufreq.h
include/linux/sched.h
kernel/sched/fair.c