Skip to content

Commit

Permalink
Interactive cpufreq governor.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Chan authored and Unhelpful committed Aug 25, 2010
1 parent 662b93d commit aea72a9
Show file tree
Hide file tree
Showing 6 changed files with 372 additions and 0 deletions.
24 changes: 24 additions & 0 deletions Documentation/cpu-freq/governors.txt
Expand Up @@ -28,6 +28,7 @@ Contents:
2.3 Userspace
2.4 Ondemand
2.5 Conservative
2.6 Interactive

3. The Governor Interface in the CPUfreq Core

Expand Down Expand Up @@ -162,6 +163,29 @@ 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 Interactive
---------------

The CPUfreq governor "interactive" is designed for low latency,
interactive workloads. This governor sets the CPU speed depending on
usage, similar to "ondemand" and "conservative" governors. However
there is no polling, or 'sample_rate' required to scale the CPU up.

Sampling CPU load every X ms can lead to under powering the CPU
for X ms, leading to dropped framerate, stuttering UI etc..

Scaling the CPU up is done when coming out of idle, and like "ondemand"
scaling up will always go to MAX, then step down based off of cpu load.

There is only one tuneable value for this governor:

min_sample_time: The ammount of time the CPU must spend (in uS)
at the current frequency before scaling DOWN. This is done to
more accurately determine the cpu workload and the best speed for that
workload. The default is 50ms.


3. The Governor Interface in the CPUfreq Core
=============================================

Expand Down
16 changes: 16 additions & 0 deletions drivers/cpufreq/Kconfig
Expand Up @@ -115,6 +115,15 @@ 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_INTERACTIVE
bool "interactive"
select CPU_FREQ_GOV_INTERACTIVE
help
Use the 'interactive' governor as default. This gets full cpu frequency
scaling for workloads that are latency sensitive, typically interactive
workloads..

endchoice

config CPU_FREQ_GOV_PERFORMANCE
Expand Down Expand Up @@ -172,6 +181,13 @@ config CPU_FREQ_GOV_ONDEMAND

If in doubt, say N.

config CPU_FREQ_GOV_INTERACTIVE
tristate "'interactive' cpufreq policy governor"
help
'interactive' - This driver adds a dynamic cpufreq policy governor.
Designed for low latency burst workloads. Scaling it done when coming
out of idle instead of polling.

config CPU_FREQ_GOV_CONSERVATIVE
tristate "'conservative' cpufreq governor"
depends on CPU_FREQ
Expand Down
1 change: 1 addition & 0 deletions drivers/cpufreq/Makefile
Expand Up @@ -9,6 +9,7 @@ obj-$(CONFIG_CPU_FREQ_GOV_POWERSAVE) += cpufreq_powersave.o
obj-$(CONFIG_CPU_FREQ_GOV_USERSPACE) += cpufreq_userspace.o
obj-$(CONFIG_CPU_FREQ_GOV_ONDEMAND) += cpufreq_ondemand.o
obj-$(CONFIG_CPU_FREQ_GOV_CONSERVATIVE) += cpufreq_conservative.o
obj-$(CONFIG_CPU_FREQ_GOV_INTERACTIVE) += cpufreq_interactive.o

# CPUfreq cross-arch helpers
obj-$(CONFIG_CPU_FREQ_TABLE) += freq_table.o
Expand Down

0 comments on commit aea72a9

Please sign in to comment.