Trivial update: option for default ondemand cpufreq governor
PATCH 1/1 Trivial update: option for default ondemand cpufreq governor
This is a trivial patch that adds a Kconfig option to select the *ondemand* cpufreq governor as the *default cpufreq governor*.
It seemed as useful as the other default governor options, and since nobody else did it, here it is.
Feedback would be very appreciated. Also, please note that this is my first patch.
Applies cleanly to 2.6.10-rc2, 2.6.10-rc2-bk2 and 2.6.10-rc2-mm1. Applies to 2.6.9 sources with line offset errors only.
Signed-off-by; Pedro Venda <[email protected]>
drivers/cpufreq/Kconfig +9 -0
@@ -65,6 +65,15 @@ config CPU_FREQ_DEFAULT_GOV_USERSPACE program shall be able to set the CPU dynamically without having to enable the userspace governor manually. +config CPU_FREQ_DEFAULT_GOV_ONDEMAND + bool "ondemand" + select CPU_FREQ_GOV_ONDEMAND + help + Use the CPUFreq governor 'ondemand' as default. This uses a + polling mechanism to dynamically change frequency based on + the CPU utilization. The desired functioning of this governor + depends on the CPU capability to do fast frequency switching. + endchoice config CPU_FREQ_GOV_PERFORMANCE
include/linux/cpufreq.h +3 -0
@@ -323,6 +323,9 @@ extern struct cpufreq_governor cpufreq_g#elif defined(CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE )extern struct cpufreq_governor cpufreq_gov_userspace;#define CPUFREQ_DEFAULT_GOVERNOR &cpufreq_gov_userspace +#elif defined(CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND ) +extern struct cpufreq_governor cpufreq_gov_dbs; +#define CPUFREQ_DEFAULT_GOVERNOR &cpufreq_gov_dbs#endif
Signature · 3 lines
Pedro João Lopes Venda email: [email protected] http://arrakis.dhis.org
Hi,
Quoted 3 lines · Pedro Venda
This is a trivial patch that adds a
Kconfigoption to select the *ondemand* cpufreq governor as the *default cpufreq governor*.
See here:
http://www.ussg.iu.edu/hypermail/linux/kernel/0408.3/0953.html
"... If transition_latency is high, the ondemand governor initialization will fail (User level governor is suggested in this case). Hence it cannot be used as a default governor."
Signature · 1 line
Dmitry
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
| See here: | | http://www.ussg.iu.edu/hypermail/linux/kernel/0408.3/0953.html | | "... If transition_latency is high, the ondemand governor initialization | will fail (User level governor is suggested in this case). Hence it cannot | be used as a default governor."
ok, thanks. shame on me.
- --
Pedro João Lopes Venda
email: [email protected]
http://arrakis.dhis.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFBnKLZeRy7HWZxjWERAotoAJ90fyXTU8zXtqaDIiG2wc5srgjrHQCfaRs8 d1XatsYQUrSvxFe/fuzKk6g=
=Wuxa
-----END PGP SIGNATURE-----