aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
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 /Documentation
parent821d85f7102ca27538116b4ccbdafe0f5e134261 (diff)
downloadkernel_samsung_tuna-9dc27818b1beee80ca2bf92e1adc7720c9f94417.zip
kernel_samsung_tuna-9dc27818b1beee80ca2bf92e1adc7720c9f94417.tar.gz
kernel_samsung_tuna-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 'Documentation')
-rw-r--r--Documentation/cpu-freq/governors.txt28
1 files changed, 28 insertions, 0 deletions
diff --git a/Documentation/cpu-freq/governors.txt b/Documentation/cpu-freq/governors.txt
index e74d0a2..c2e3d3d 100644
--- a/Documentation/cpu-freq/governors.txt
+++ b/Documentation/cpu-freq/governors.txt
@@ -193,6 +193,34 @@ governor but for the opposite direction. For example when set to its
default value of '20' it means that if the CPU usage needs to be below
20% between samples to have the frequency decreased.
+
+2.6 Hotplug
+-----------
+
+The CPUfreq governor "hotplug" operates similary to "ondemand" and
+"conservative". It's decisions are based primarily on CPU load. Like
+"ondemand" the "hotplug" governor will ramp up to the highest frequency
+once the run-time tunable "up_threshold" parameter is crossed. Like
+"conservative", the "hotplug" governor exports a "down_threshold"
+parameter that is also tunable at run-time. When the "down_threshold"
+is crossed the CPU transitions to the next lowest frequency in the
+CPUfreq frequency table instead of decrementing the frequency based on a
+percentage of maximum load.
+
+The main reason "hotplug" governor exists is for architectures requiring
+that only the master CPU be online in order to hit low-power states
+(C-states). OMAP4 is one such example of this. The "hotplug" governor
+is also helpful in reducing thermal output in devices with tight thermal
+constraints.
+
+Auxillary CPUs are onlined/offline based on CPU load, but the decision
+to do so is made after averaging several sampling windows. This is to
+reduce CPU hotplug "thrashing", which can be caused by normal system
+entropy and leads to lots of spurious plug-in and plug-out transitions.
+The number of sampling periods averaged together is tunable via the
+"hotplug_in_sampling_periods" and "hotplug_out_sampling_periods"
+run-time tunable parameters.
+
3. The Governor Interface in the CPUfreq Core
=============================================