Permalink
Browse files

Add smartassv2 CPU governor (erasmux)

  • Loading branch information...
kangtastic committed Oct 18, 2011
1 parent 4f4e7f5 commit b3446d6b4667ff8a469d26e8c5ce587503e13298
@@ -29,6 +29,7 @@ Contents:
2.4 Ondemand
2.5 Conservative
2.6 Interactive
+2.7 SmartassV2
3. The Governor Interface in the CPUfreq Core
@@ -206,6 +207,40 @@ more accurately determine the cpu workload and the best speed for that
workload. The default is 50ms.
+2.7 SmartassV2
+---------------
+
+The CPUfreq governor "smartassV2", like other governors, aims to balance
+performance vs battery life by using low frequencies when load is low and
+ramping the frequency when necessary, fast enough to ensure responsiveness.
+
+The implementation of the governor is roughtly based on the idea of interactive.
+The idle loop is used to track when the CPU has idle cycles. The idle loop will
+set a relatively high rate timer to sample the load when appropriate, the timer
+will measure the load since it was set and schedule a work queue task to do the
+actual frequency change when necessary.
+
+The most important tunable is the "ideal" frequency: this governor will aim
+for this frequency, in the sense that it will ramp towards this frequency much
+more aggresively than beyond it - both when ramping up from below this frequency
+and when ramping down from above this frequency. Still, note, that when load is
+low enough the governor should choose the lowest available frequency regardless
+of the ideal frequency and similarly when load is consistently high enough the
+highest available frequency will be used.
+
+Smartass also tracks the state of the screen, and when screen is off (a.k.a
+sleep or suspended in the terms of this governor) a different ideal frequency
+is used. This is the only difference between the screen on and screen off
+states. Proper tuning of the awake_ideal_freq and sleep_ideal_freq should
+allow both high responsiveness when screen is on and utilizing the low
+frequency range when load is low, especially when screen is off.
+
+Finally, smartass is a highly customizable governor with almost everything
+tweakable through the sysfs. For a detailed explaination of each tunable,
+please see the inline comments at the begging of the code (smartass2.c).
+
+
+
3. The Governor Interface in the CPUfreq Core
=============================================
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.35.7
-# Fri Oct 14 18:22:16 2011
+# Mon Oct 17 23:22:49 2011
#
CONFIG_ARM=y
CONFIG_HAVE_PWM=y
@@ -46,6 +46,7 @@ CONFIG_HAVE_KERNEL_LZO=y
CONFIG_KERNEL_GZIP=y
# CONFIG_KERNEL_BZIP2 is not set
# CONFIG_KERNEL_LZMA is not set
+# CONFIG_KERNEL_XZ is not set
# CONFIG_KERNEL_LZO is not set
CONFIG_SWAP=y
CONFIG_SYSVIPC=y
@@ -61,8 +62,6 @@ CONFIG_SYSVIPC_SYSCTL=y
# CONFIG_TREE_RCU is not set
# CONFIG_TREE_PREEMPT_RCU is not set
CONFIG_TINY_RCU=y
-# CONFIG_TINY_PREEMPT_RCU is not set
-# CONFIG_PREEMPT_RCU is not set
# CONFIG_TREE_RCU_TRACE is not set
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
@@ -91,11 +90,13 @@ CONFIG_INITRAMFS_ROOT_GID=1005
CONFIG_RD_GZIP=y
CONFIG_RD_BZIP2=y
CONFIG_RD_LZMA=y
+# CONFIG_RD_XZ is not set
CONFIG_RD_LZO=y
# CONFIG_INITRAMFS_COMPRESSION_NONE is not set
# CONFIG_INITRAMFS_COMPRESSION_GZIP is not set
# CONFIG_INITRAMFS_COMPRESSION_BZIP2 is not set
CONFIG_INITRAMFS_COMPRESSION_LZMA=y
+# CONFIG_INITRAMFS_COMPRESSION_XZ is not set
# CONFIG_INITRAMFS_COMPRESSION_LZO is not set
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_SYSCTL=y
@@ -467,7 +468,8 @@ CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_INTERACTIVE is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_INTERACTIVEX is not set
-# CONFIG_CPU_FREQ_GOV_PERFORMANCE is not set
+# CONFIG_CPU_FREQ_DEFAULT_GOV_SMARTASS2 is not set
+CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set
# CONFIG_CPU_FREQ_GOV_USERSPACE is not set
CONFIG_CPU_FREQ_GOV_ONDEMAND=y
@@ -476,6 +478,7 @@ CONFIG_CPU_FREQ_GOV_ONDEMANDX_INPUT=y
CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
CONFIG_CPU_FREQ_GOV_INTERACTIVE=y
CONFIG_CPU_FREQ_GOV_INTERACTIVEX=y
+# CONFIG_CPU_FREQ_GOV_SMARTASS2=y
CONFIG_CPU_IDLE=y
CONFIG_CPU_IDLE_GOV_LADDER=y
CONFIG_CPU_IDLE_GOV_MENU=y
@@ -1760,6 +1763,7 @@ CONFIG_ANDROID_LOW_MEMORY_KILLER=y
# RAR Register Driver
#
# CONFIG_IIO is not set
+# CONFIG_RAMZSWAP is not set
# CONFIG_BATMAN_ADV is not set
# CONFIG_FB_SM7XX is not set
@@ -1771,6 +1775,7 @@ CONFIG_ANDROID_LOW_MEMORY_KILLER=y
# CONFIG_ADIS16255 is not set
CONFIG_XVMALLOC=y
CONFIG_ZRAM=y
+# CONFIG_ZRAM_DEBUG is not set
CONFIG_SAMSUNG_PHONE_TTY=m
CONFIG_ONEDRAM_READ_FILE=y
# CONFIG_ONEDRAM_READ_FSR is not set
@@ -1873,28 +1878,6 @@ CONFIG_MISC_FILESYSTEMS=y
# CONFIG_BEFS_FS is not set
# CONFIG_BFS_FS is not set
# CONFIG_EFS_FS is not set
-
-#
-# RFS Filesystem
-#
-CONFIG_RFS_FS=m
-CONFIG_RFS_DEFAULT_IOCHARSET="utf8"
-CONFIG_RFS_FS_PERMISSION=y
-# CONFIG_RFS_FS_XATTR is not set
-CONFIG_RFS_FS_SYNC_ON_CLOSE=y
-CONFIG_RFS_FS_ERASE_SECTOR=y
-CONFIG_RFS_FS_SPECIAL=y
-
-#
-# RFS debugging options
-#
-# CONFIG_RFS_FS_DEBUG is not set
-
-#
-# RFS Core Filesystems
-#
-CONFIG_RFS_FS_CORE_FAT=m
-CONFIG_RFS_FS_FAT_VFAT=y
# CONFIG_LOGFS is not set
CONFIG_CRAMFS=y
# CONFIG_SQUASHFS is not set
@@ -2206,6 +2189,8 @@ CONFIG_ZLIB_INFLATE=y
CONFIG_ZLIB_DEFLATE=y
CONFIG_LZO_COMPRESS=y
CONFIG_LZO_DECOMPRESS=y
+# CONFIG_XZ_DEC is not set
+# CONFIG_XZ_DEC_BCJ is not set
CONFIG_DECOMPRESS_GZIP=y
CONFIG_DECOMPRESS_BZIP2=y
CONFIG_DECOMPRESS_LZMA=y
@@ -142,6 +142,12 @@ config CPU_FREQ_DEFAULT_GOV_INTERACTIVEX
loading your cpufreq low-level hardware driver, using the
'interactiveX' governor for latency-sensitive workloads
+config CPU_FREQ_DEFAULT_GOV_SMARTASS2
+ bool "smartass2"
+ select CPU_FREQ_GOV_SMARTASS2
+ help
+ Use the CPUFreq governor 'smartassV2' as default.
+
endchoice
config CPU_FREQ_GOV_PERFORMANCE
@@ -256,4 +262,11 @@ config CPU_FREQ_GOV_INTERACTIVEX
help
'interactiveX' - Modified version of interactive with sleep+wake code.
+config CPU_FREQ_GOV_SMARTASS2
+ tristate "'smartassV2' cpufreq governor"
+ depends on CPU_FREQ
+ help
+ 'smartassV2' - a "smart" governor
+ If in doubt, say N.
+
endif # CPU_FREQ
@@ -12,6 +12,7 @@ obj-$(CONFIG_CPU_FREQ_GOV_ONDEMANDX) += cpufreq_ondemandx.o
obj-$(CONFIG_CPU_FREQ_GOV_CONSERVATIVE) += cpufreq_conservative.o
obj-$(CONFIG_CPU_FREQ_GOV_INTERACTIVE) += cpufreq_interactive.o
obj-$(CONFIG_CPU_FREQ_GOV_INTERACTIVEX) += cpufreq_interactivex.o
+obj-$(CONFIG_CPU_FREQ_GOV_SMARTASS2) += cpufreq_smartass2.o
# CPUfreq cross-arch helpers
obj-$(CONFIG_CPU_FREQ_TABLE) += freq_table.o
Oops, something went wrong.

0 comments on commit b3446d6

Please sign in to comment.