diff options
author | Sai Charan Gurrappadi <sgurrappadi@nvidia.com> | 2012-06-22 16:18:02 -0700 |
---|---|---|
committer | Varun Colbert <vcolbert@nvidia.com> | 2012-08-23 16:24:02 -0700 |
commit | ea9c7e1ef505f8eecf2e69f4084f3f939f2d7be4 (patch) | |
tree | 50ae3f6886bced59d26f5b91831dc27614d7bb15 /drivers/cpuquiet | |
parent | 362b9fdc07b579379bf7196c8554e1185341f630 (diff) |
cpuquiet: Enable cpuquiet by default
Enable cpuquiet by default if autohotplug is enabled. Cpuquiet will now
replace autohotplug as the hotplugging infrastructure. The down_delay in
the balanced governor has also been increased to 2s from 500ms to match
a similar patch for autohotplug.
Change-Id: I36747af67c55547b3dee95f7d435f9ebc075d393
Signed-off-by: Sai Charan Gurrappadi <sgurrappadi@nvidia.com>
Reviewed-on: http://git-master/r/123851
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>
Diffstat (limited to 'drivers/cpuquiet')
-rw-r--r-- | drivers/cpuquiet/Kconfig | 29 | ||||
-rw-r--r-- | drivers/cpuquiet/governors/balanced.c | 6 | ||||
-rw-r--r-- | drivers/cpuquiet/governors/userspace.c | 4 |
3 files changed, 37 insertions, 2 deletions
diff --git a/drivers/cpuquiet/Kconfig b/drivers/cpuquiet/Kconfig index 844cd34a69b3..61e707312ad7 100644 --- a/drivers/cpuquiet/Kconfig +++ b/drivers/cpuquiet/Kconfig @@ -2,10 +2,37 @@ menu "CPUQUIET Framework" config CPUQUIET_FRAMEWORK bool "Cpuquiet framework" - default n help Cpuquiet implements pluggable policies for forcing cpu cores into a quiescent state. Appropriate policies will save power without hurting performance. + +if CPUQUIET_FRAMEWORK + +choice + prompt "Default CPUQuiet governor" + help + This option sets which CPUQuiet governor shall be loaded at + startup. If in doubt, select 'userspace' + +config CPUQUIET_DEFAULT_GOV_USERSPACE + bool "userspace" + select CPUQUIET_GOVERNOR_USERSPACE + help + Use the CPUQuiet governor 'userspace' as default. This disables + any automatic hotplugging of cpus and allows manual control + over the number of cpus online in the system + +config CPUQUIET_DEFAULT_GOV_BALANCED + bool "balanced" + select CPUQUIET_GOVERNOR_BALANCED + depends on CPU_FREQ + help + Use the CPUQuiet governor 'balanced' as default. This dynamically + scales the number of cpus online in the system based on the cpu + load +endchoice + +endif endmenu diff --git a/drivers/cpuquiet/governors/balanced.c b/drivers/cpuquiet/governors/balanced.c index 61dd2cb1009a..d95be18596ab 100644 --- a/drivers/cpuquiet/governors/balanced.c +++ b/drivers/cpuquiet/governors/balanced.c @@ -416,7 +416,7 @@ static int balanced_start(void) INIT_DELAYED_WORK(&balanced_work, balanced_work_func); up_delay = msecs_to_jiffies(100); - down_delay = msecs_to_jiffies(500); + down_delay = msecs_to_jiffies(2000); table = cpufreq_frequency_get_table(0); for (count = 0; table[count].frequency != CPUFREQ_TABLE_END; count++); @@ -456,6 +456,10 @@ static void __exit exit_balanced(void) } MODULE_LICENSE("GPL"); +#ifdef CONFIG_CPUQUIET_DEFAULT_GOV_BALANCED +fs_initcall(init_balanced); +#else module_init(init_balanced); +#endif module_exit(exit_balanced); diff --git a/drivers/cpuquiet/governors/userspace.c b/drivers/cpuquiet/governors/userspace.c index 470056c5e32a..664594d68d8c 100644 --- a/drivers/cpuquiet/governors/userspace.c +++ b/drivers/cpuquiet/governors/userspace.c @@ -52,5 +52,9 @@ static void __exit exit_usermode(void) } MODULE_LICENSE("GPL"); +#ifdef CONFIG_CPUQUIET_DEFAULT_GOV_USERSPACE +fs_initcall(init_usermode); +#else module_init(init_usermode); +#endif module_exit(exit_usermode); |