aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq/Kconfig
diff options
context:
space:
mode:
authorMike Turquette <mturquette@ti.com>2011-05-17 09:43:09 -0500
committerNishanth Menon <nm@ti.com>2011-06-13 16:39:17 -0500
commit9dc27818b1beee80ca2bf92e1adc7720c9f94417 (patch)
treef2d5efcbe9f6ad9c7f9298eadc50fb3296c329d4 /drivers/cpufreq/Kconfig
parent821d85f7102ca27538116b4ccbdafe0f5e134261 (diff)
downloadkernel_samsung_espresso10-9dc27818b1beee80ca2bf92e1adc7720c9f94417.zip
kernel_samsung_espresso10-9dc27818b1beee80ca2bf92e1adc7720c9f94417.tar.gz
kernel_samsung_espresso10-9dc27818b1beee80ca2bf92e1adc7720c9f94417.tar.bz2
cpufreq: introduce hotplug governor
The "hotplug" governor scales CPU frequency based on load, similar to "ondemand". It scales up to the highest frequency when "up_threshold" is crossed and scales down one frequency at a time when "down_threshold" is crossed. Unlike those governors, target frequencies are determined by directly accessing the CPUfreq frequency table, instead of taking some percentage of maximum available frequency. The key difference in the "hotplug" governor is that it will disable auxillary CPUs when the system is very idle, and enable them again once the system becomes busy. This is achieved by averaging load over multiple sampling periods; if CPUs were online or offlined based on a single sampling period then thrashing will occur. Sysfs entries exist for "hotplug_in_sampling_periods" and for "hotplug_out_sampling_periods" which determine how many consecutive periods get averaged to determine if auxillery CPUs should be onlined or offlined. Defaults are 5 periods and 20 periods respectively. Otherwise the standard sysfs entries you might find for "ondemand" and "conservative" governors are there. To use this governor it is assumed that your CPUfreq driver has populated the CPUfreq table, CONFIG_NO_HZ is enabled and CONFIG_HOTPLUG_CPU is enabled. Changes in V2: Corrected default sampling periods Optimized load history array resizing Maintain load history when resizing array Add locking to dbs_check_cpu Switch from enable_nonboot_cpus to cpu_up Switch from disable_nonboot_cpus to down_cpu Fix some printks Coding style around for-loops Signed-off-by: Mike Turquette <mturquette@ti.com> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Diffstat (limited to 'drivers/cpufreq/Kconfig')
-rw-r--r--drivers/cpufreq/Kconfig33
1 files changed, 33 insertions, 0 deletions
diff --git a/drivers/cpufreq/Kconfig b/drivers/cpufreq/Kconfig
index 9fb8485..07711d1 100644
--- a/drivers/cpufreq/Kconfig
+++ b/drivers/cpufreq/Kconfig
@@ -99,6 +99,19 @@ config CPU_FREQ_DEFAULT_GOV_CONSERVATIVE
Be aware that not all cpufreq drivers support the conservative
governor. If unsure have a look at the help section of the
driver. Fallback governor will be the performance governor.
+
+config CPU_FREQ_DEFAULT_GOV_HOTPLUG
+ bool "hotplug"
+ select CPU_FREQ_GOV_HOTPLUG
+ select CPU_FREQ_GOV_PERFORMANCE
+ help
+ Use the CPUFreq governor 'hotplug' as default. This allows you
+ to get a full dynamic frequency capable system with CPU
+ hotplug support by simply loading your cpufreq low-level
+ hardware driver. Be aware that not all cpufreq drivers
+ support the hotplug governor. If unsure have a look at
+ the help section of the driver. Fallback governor will be the
+ performance governor.
endchoice
config CPU_FREQ_GOV_PERFORMANCE
@@ -184,5 +197,25 @@ depends on X86
source "drivers/cpufreq/Kconfig.x86"
endmenu
+config CPU_FREQ_GOV_HOTPLUG
+ tristate "'hotplug' cpufreq governor"
+ depends on CPU_FREQ && NO_HZ && HOTPLUG_CPU
+ help
+ 'hotplug' - this driver mimics the frequency scaling behavior
+ in 'ondemand', but with several key differences. First is
+ that frequency transitions use the CPUFreq table directly,
+ instead of incrementing in a percentage of the maximum
+ available frequency. Second 'hotplug' will offline auxillary
+ CPUs when the system is idle, and online those CPUs once the
+ system becomes busy again. This last feature is needed for
+ architectures which transition to low power states when only
+ the "master" CPU is online, or for thermally constrained
+ devices.
+
+ If you don't have one of these architectures or devices, use
+ 'ondemand' instead.
+
+ If in doubt, say N.
+
endif
endmenu