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>
This commit is contained in:
Sai Charan Gurrappadi
2012-06-22 16:18:02 -07:00
committed by Huang, Tao
parent f5532b9866
commit c35afbfcbe
3 changed files with 37 additions and 2 deletions

View File

@@ -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

View File

@@ -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);

View File

@@ -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);