Hi Todd and others,
If we have a multi-package system, where we have multiple instances of struct policy (per package), currently we can't have multiple instances of same governor. i.e. We can't have multiple instances of Interactive governor for multiple packages.
This is a bottleneck for multicluster system, where we want different packages to use Interactive governor, but with different tunables.
---------x------------x---------
Recently, I have upstreamed this support in 3.10-rc1 for cpufreq core, Ondemand and Conservative governor. Now is an attempt for Interactive Governor.
I didn't had any clue on what kernel to rebase my patches over as I couldn't find a 3.10-rc based branch in your tree and so based it on experimental/android-3.9.
So, this is what this patchset does: - Backports some important patches from v3.10-rc1/2 to v3.9: First 8 patches - Added few more supportive patches which might go in rc3: Next 4 patches - Finally updated Interactive governor: Last 4 patches
So, Review is probably required only for last 4 patches. The last patch is a bit long, it is mostly rearrangement of the code rather then major update. It is based on the patchset which I wrote for Ondemand/Conservative governor.
This has been tested on ARM big LITTLE platform which has multiple packages requiring separate tunables.
Nathan Zimmer (1): cpufreq: Convert the cpufreq_driver_lock to a rwlock
Stratos Karafotis (1): cpufreq: governors: Calculate iowait time only when necessary
Viresh Kumar (14): cpufreq: Add per policy governor-init/exit infrastructure cpufreq: governor: Implement per policy instances of governors cpufreq: Call __cpufreq_governor() with correct policy->cpus mask cpufreq: Don't call __cpufreq_governor() for drivers without target() cpufreq: governors: Fix CPUFREQ_GOV_POLICY_{INIT|EXIT} notifiers cpufreq: Issue CPUFREQ_GOV_POLICY_EXIT notifier before dropping policy refcount cpufreq: Add EXPORT_SYMBOL_GPL for have_governor_per_policy cpufreq: governors: Move get_governor_parent_kobj() to cpufreq.c cpufreq: Drop rwsem lock around CPUFREQ_GOV_POLICY_EXIT cpufreq: Move get_cpu_idle_time() to cpufreq.c cpufreq: interactive: Use generic get_cpu_idle_time() from cpufreq.c cpufreq: interactive: Remove unnecessary cpu_online() check cpufreq: interactive: Move definition of cpufreq_gov_interactive downwards cpufreq: Interactive: Implement per policy instances of governor
drivers/cpufreq/cpufreq.c | 157 ++++++-- drivers/cpufreq/cpufreq_conservative.c | 195 ++++++---- drivers/cpufreq/cpufreq_governor.c | 273 +++++++------- drivers/cpufreq/cpufreq_governor.h | 120 +++++- drivers/cpufreq/cpufreq_interactive.c | 663 +++++++++++++++++++-------------- drivers/cpufreq/cpufreq_ondemand.c | 274 ++++++++------ include/linux/cpufreq.h | 19 +- 7 files changed, 1043 insertions(+), 658 deletions(-)