Skip to content

Commit

Permalink
Add lagfree and smoothass CPU governors.
Browse files Browse the repository at this point in the history
  • Loading branch information
Brett Goulder committed Jul 10, 2012
1 parent d2660c6 commit ad69588
Show file tree
Hide file tree
Showing 7 changed files with 1,361 additions and 2 deletions.
8 changes: 7 additions & 1 deletion arch/arm/configs/stratosphere_defconfig
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.35.7-EI2
# Tue Jul 10 00:32:48 2012
# Tue Jul 10 00:42:37 2012
#
CONFIG_ARM=y
CONFIG_HAVE_PWM=y
Expand Down Expand Up @@ -458,6 +458,8 @@ CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
# CONFIG_CPU_FREQ_DEFAULT_GOV_INTERACTIVE is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_SMARTASS is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_SMARTASS2 is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_LAGFREE is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_SMOOTHASS is not set
CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
CONFIG_CPU_FREQ_GOV_POWERSAVE=y
CONFIG_CPU_FREQ_GOV_USERSPACE=y
Expand All @@ -466,6 +468,10 @@ CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
CONFIG_CPU_FREQ_GOV_INTERACTIVE=y
# CONFIG_CPU_FREQ_GOV_SMARTASS is not set
CONFIG_CPU_FREQ_GOV_SMARTASS2=y
CONFIG_CPU_FREQ_GOV_LAGFREE=y
CONFIG_CPU_FREQ_MIN_TICKS=10
CONFIG_CPU_FREQ_SAMPLING_LATENCY_MULTIPLIER=1000
CONFIG_CPU_FREQ_GOV_SMOOTHASS=y
CONFIG_CPU_IDLE=y
CONFIG_CPU_IDLE_GOV_LADDER=y
CONFIG_CPU_IDLE_GOV_MENU=y
Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ DATE=$(date +%m%d)


# Edit This for your Toolchain Dir
TOOLCHAIN=/opt/toolchains/2009q3-68/bin/arm-none-eabi-
TOOLCHAIN=/opt/toolchains/arm-2009q3/bin/arm-none-linux-gnueabi-


# execution!
Expand Down
58 changes: 58 additions & 0 deletions drivers/cpufreq/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,26 @@ config CPU_FREQ_DEFAULT_GOV_SMARTASS2
select CPU_FREQ_GOV_SMARTASS2
help
Use the CPUFreq governor 'smartassV2' as default.

config CPU_FREQ_DEFAULT_GOV_LAGFREE
bool "lagfree"
select CPU_FREQ_GOV_LAGFREE
select CPU_FREQ_GOV_PERFORMANCE
help
Use the CPUFreq governor 'lagfree' as default. This allows
you to get a full dynamic frequency capable system by simply
loading your cpufreq low-level hardware driver.
Be aware that not all cpufreq drivers support the lagfree
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_SMOOTHASS
bool "smoothass"
select CPU_FREQ_GOV_SMOOTHASS
select CPU_FREQ_GOV_PERFORMANCE
help
Use CPUFREQ smoothass as default.

endchoice

config CPU_FREQ_GOV_PERFORMANCE
Expand Down Expand Up @@ -229,5 +249,43 @@ config CPU_FREQ_GOV_SMARTASS2
'smartassV2' - a "smart" governor
If in doubt, say N.

config CPU_FREQ_GOV_LAGFREE
tristate "'lagfree' cpufreq governor"
depends on CPU_FREQ
help
'lagfree' - this driver is rather similar to the 'ondemand'
governor both in its source code and its purpose, the difference is
its optimisation for better suitability in a battery powered
environment. The frequency is gracefully increased and decreased
rather than jumping to 100% when speed is required.

To compile this driver as a module, choose M here: the
module will be called cpufreq_lagfree.

For details, take a look at linux/Documentation/cpu-freq.

If in doubt, say N.

config CPU_FREQ_MIN_TICKS
int "Ticks between governor polling interval."
depends on CPU_FREQ_GOV_LAGFREE
default 10
help
Minimum number of ticks between polling interval for governors.

config CPU_FREQ_SAMPLING_LATENCY_MULTIPLIER
int "Sampling rate multiplier for governors."
depends on CPU_FREQ_GOV_LAGFREE
default 1000
help
Sampling latency rate multiplied by the cpu switch latency.
Affects governor polling.

config CPU_FREQ_GOV_SMOOTHASS
tristate "'smoothass' governor"
depends on CPU_FREQ
help
Slightly more aggressive smartass

endif # CPU_FREQ

3 changes: 3 additions & 0 deletions drivers/cpufreq/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ obj-$(CONFIG_CPU_FREQ_GOV_CONSERVATIVE) += cpufreq_conservative.o
obj-$(CONFIG_CPU_FREQ_GOV_INTERACTIVE) += cpufreq_interactive.o
obj-$(CONFIG_CPU_FREQ_GOV_SMARTASS) += cpufreq_smartass.o
obj-$(CONFIG_CPU_FREQ_GOV_SMARTASS2) += cpufreq_smartass2.o
obj-$(CONFIG_CPU_FREQ_GOV_LAGFREE) += cpufreq_lagfree.o
obj-$(CONFIG_CPU_FREQ_GOV_SMOOTHASS) += cpufreq_smoothass.o


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

0 comments on commit ad69588

Please sign in to comment.