From: Sai Charan Gurrappadi Date: Fri, 22 Jun 2012 23:18:02 +0000 (-0700) Subject: cpuquiet: Enable cpuquiet by default X-Git-Tag: firefly_0821_release~4158^2~43 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=c35afbfcbede22a6da6fb0c01121c2961ba2c106;p=firefly-linux-kernel-4.4.55.git 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 Reviewed-on: http://git-master/r/123851 Reviewed-by: Varun Colbert Tested-by: Varun Colbert --- 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);