Skip to content

Commit

Permalink
Add 10 new Governors that cover all tastes and types of usage..
Browse files Browse the repository at this point in the history
Read all about them here: https://forum.xda-developers.com/t/ref-guide-most-up-to-date-guide-on-cpu-governors-i-o-schedulers-and-more.3048957/

* Interactive Pro
A newer (modified) version of interactive which is optimized for devices such as the One Plus One.
It is a more efficient than the original Interactive because it continuously re-evaluates the load
of each CPU therefore allowing the CPU to scale efficiently.

* Impulse
An improved version of interactive modified by neobuddy89. Impulse aims to have a balance between
battery and performance just like interactive but has some tweaks to save battery.

* SmartassV2
Version 2 of the original smartass governor from Erasmux. The governor aim for an "ideal frequency",
and ramp up more aggressively towards this freq and less aggressive after.

* Alucard
Alucard is based on ondemand but has been heavily tweaked to bring better battery life and performance.
It has been known to be battery friendly without sacrificing much performance.

* PegasusQ
The Pegasus-q is a multi-core based on the Ondemand governor and governor with integrated hot-plugging.
It is quite stable and has the same battery life as ondemand.

* Dancedance
Based on conservative with some smartass features, it scales accordingly to conservatives laws. So it
will start from the bottom, take a load sample, if it's above the upthreshold, ramp up only one speed at
a time, and ramp down one at a time. The goal of this is to get the best battery life with decent performance.
It is a performance focused governor but also blends with some battery savings.

* Wheatley
Wheatley is a more performance orientated governor as it scales more aggressively than ondemand and sticks
with higher frequencies.

*Lionfish
The Lionfish governor combines traits of the conservative, ondemand, and interactive governors. It is designed
to maximize battery life without noticeably impacting performance. It responds quickly to heavy loads while
staying within the region of optimal CPU performance per watt. With moderate loads, it periodically votes to
raise, maintain, or decrease the frequency.

*Hyper
Hyper is an aggressive smart and smooth governor based on the Ondemand and is equipped with several features
of Ondemandx suspend profiles. It also has the fast_start deep_sleep variable and detection features. In addition,
the maximum frequency is in suspend mode 500Mhz or whatever the kernel developer sets it to. This is a more
smoothness oriented governor which means that it is good for performance, without sacrificing much battery life.

*Electron
Electron is a governor based on interactive from the latest MSM8994 CAF branch with more upstream improvements,
powersave bias, screen off max frequency, and some other tweaks to improve battery life without hindering performance.

Change-Id: I71f837b490812d10f06268cfde1f27aa2df70c76
  • Loading branch information
villarleg authored and aoleary committed Apr 21, 2021
1 parent f2ee874 commit 6779c3f
Show file tree
Hide file tree
Showing 13 changed files with 8,747 additions and 24 deletions.
131 changes: 131 additions & 0 deletions drivers/cpufreq/Kconfig
Expand Up @@ -141,6 +141,12 @@ config CPU_FREQ_DEFAULT_GOV_BLU_ACTIVE
loading your cpufreq low-level hardware driver, using the
'interactive' governor for latency-sensitive workloads.

config CPU_FREQ_DEFAULT_GOV_INTERACTIVE_PRO
bool "interactive_pro"
select CPU_FREQ_GOV_INTERACTIVE_PRO
help
Use the CPUFreq governor 'interactive_pro' as default.

config CPU_FREQ_DEFAULT_GOV_INTELLIACTIVE
bool "intelliactive"
select CPU_FREQ_GOV_INTELLIACTIVE
Expand All @@ -165,6 +171,60 @@ config CPU_FREQ_DEFAULT_GOV_ELECTRON
you to get a full dynamic cpu frequency capable system by simply
loading your cpufreq low-level hardware driver, using the
'electron' governor for latency-sensitive workloads.

config CPU_FREQ_DEFAULT_GOV_LIONFISH
bool "lionfish"
select CPU_FREQ_GOV_LIONFISH
help
Use the CPUFreq governor 'lionfish' as default.

config CPU_FREQ_DEFAULT_GOV_HYPER
bool "hyper"
select CPU_FREQ_GOV_HYPER
help
Use the CPUFreq governor 'hyper' as default. This allows
you to get a full dynamic cpu frequency capable system by simply
loading your cpufreq low-level hardware driver, using the
'hyper' governor for latency-sensitive workloads.

config CPU_FREQ_DEFAULT_GOV_IMPULSE
bool "impulse"
select CPU_FREQ_GOV_IMPULSE
help
Use the CPUFreq governor 'impulse' as default. This allows
you to get a full dynamic cpu frequency capable system by simply
loading your cpufreq low-level hardware driver, using the
'impulse' governor for latency-sensitive workloads.

config CPU_FREQ_DEFAULT_GOV_SMARTASS2
bool "smartassV2"
select CPU_FREQ_GOV_SMARTASS2
help

config CPU_FREQ_DEFAULT_GOV_ALUCARD
bool "alucard"
select CPU_FREQ_GOV_ALUCARD
help

config CPU_FREQ_DEFAULT_GOV_PEGASUSQ
bool "pegasusq"
select CPU_FREQ_GOV_PEGASUSQ
help
Use the CPUFreq governor 'pegasusq' as default.

config CPU_FREQ_DEFAULT_GOV_DANCEDANCE
bool "dancedance"
select CPU_FREQ_GOV_DANCEDANCE
help
Use the CPUFreq governor 'dancedance' as default.

config CPU_FREQ_DEFAULT_GOV_WHEATLEY
bool "wheatley"
select CPU_FREQ_GOV_WHEATLEY
select CPU_FREQ_GOV_PERFORMANCE
help
Use the CPUFreq governor 'wheatley' as default.

endchoice

config CPU_FREQ_GOV_PERFORMANCE
Expand Down Expand Up @@ -277,6 +337,77 @@ config CPU_FREQ_GOV_ELECTRON
help
'electron' - another tuned interactive with extra options

config CPU_FREQ_GOV_INTERACTIVE_PRO
tristate "'interactive_pro' cpufreq governor"
depends on CPU_FREQ

config CPU_FREQ_GOV_INTELLIACTIVE
tristate "'intelliactive' cpufreq policy governor"
depends on CPU_FREQ

config CPU_FREQ_GOV_IMPULSE
tristate "'impulse' cpufreq policy governor"
help
'impulse' - This driver adds a dynamic cpufreq policy governor
designed for latency-sensitive workloads.

If in doubt, say N.

config CPU_FREQ_GOV_SMARTASS2
tristate "'smartassV2' cpufreq governor"
depends on CPU_FREQ
help
'smartassV2' - a "smart" governor

config CPU_FREQ_GOV_ALUCARD
tristate "'alucard' cpufreq governor"
depends on CPU_FREQ

config CPU_FREQ_GOV_PEGASUSQ
tristate "'pegasusq' cpufreq policy governor"

config CPU_FREQ_GOV_DANCEDANCE
tristate "'dancedance' cpufreq governor"
depends on CPU_FREQ
help
'dancedance' - a "smart" optimized governor!

If in doubt, say N.

config CPU_FREQ_GOV_WHEATLEY
tristate "'wheatley' cpufreq governor"
depends on CPU_FREQ

config CPU_FREQ_GOV_LIONFISH
tristate "'lionfish' governor"
depends on CPU_FREQ
help
'lionfish' - this is an improved version of the conservative governor
that is optimized for smartphones. To avoid lag, it quickly jumps
to an intermediate frequency when high load is encountered at low
frequencies. If very high load is encountered above this intermediate
frequency, it jumps to a high frequency. For moderate loads, it
votes to increase, decrease, or maintain frequencies at each sampling
interval. When enough votes are gathered to raise or lower the
frequency, the frequency is changed. This mechanism reduces jitter
compared to the conservative governor. Lionfish uses proportional
ramping to more quickly reach suitable frequencies compared to the
conservative governor. By default, Lionfish also reduces frequencies
more aggressively than the conservative governor when loads are reduced.

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

If in doubt, say N.

config CPU_FREQ_GOV_HYPER
tristate "'hyper' cpufreq governor"
depends on CPU_FREQ
help
'hyper' - A tweaked "ondemand" based smart and smooth optimized governor!

If in doubt, say N.

config CPU_BOOST
tristate "Event base short term CPU freq boost"
depends on CPU_FREQ
Expand Down
11 changes: 10 additions & 1 deletion drivers/cpufreq/Makefile
Expand Up @@ -3,7 +3,7 @@ obj-$(CONFIG_CPU_FREQ) += cpufreq.o freq_table.o
# CPUfreq stats
obj-$(CONFIG_CPU_FREQ_STAT) += cpufreq_stats.o

# CPUfreq governors
# CPUfreq governors
obj-$(CONFIG_CPU_FREQ_GOV_PERFORMANCE) += cpufreq_performance.o
obj-$(CONFIG_CPU_FREQ_GOV_POWERSAVE) += cpufreq_powersave.o
obj-$(CONFIG_CPU_FREQ_GOV_USERSPACE) += cpufreq_userspace.o
Expand All @@ -12,10 +12,19 @@ obj-$(CONFIG_CPU_FREQ_GOV_CONSERVATIVE) += cpufreq_conservative.o
obj-$(CONFIG_CPU_FREQ_GOV_INTERACTIVE) += cpufreq_interactive.o
obj-$(CONFIG_CPU_FREQ_GOV_BLU_ACTIVE)+= cpufreq_blu_active.o
obj-$(CONFIG_CPU_FREQ_GOV_INTELLIACTIVE) += cpufreq_intelliactive.o
obj-$(CONFIG_CPU_FREQ_GOV_LIONFISH) += cpufreq_lionfish.o
obj-$(CONFIG_CPU_FREQ_GOV_ELEMENTALX) += cpufreq_elementalx.o
obj-$(CONFIG_CPU_FREQ_GOV_ELECTRON) += cpufreq_electron.o
obj-$(CONFIG_CPU_FREQ_GOV_INTERACTIVE_PRO) += cpufreq_interactive_pro.o
obj-$(CONFIG_CPU_FREQ_GOV_IMPULSE) += cpufreq_impulse.o
obj-$(CONFIG_CPU_FREQ_GOV_SMARTASS2) += cpufreq_smartass2.o
obj-$(CONFIG_CPU_FREQ_GOV_ALUCARD) += cpufreq_alucard.o
obj-$(CONFIG_CPU_FREQ_GOV_PEGASUSQ) += cpufreq_pegasusq.o
obj-$(CONFIG_CPU_FREQ_GOV_DANCEDANCE) += cpufreq_dancedance.o
obj-$(CONFIG_CPU_FREQ_GOV_WHEATLEY) += cpufreq_wheatley.o
obj-$(CONFIG_CPU_FREQ_GOV_COMMON) += cpufreq_governor.o
obj-$(CONFIG_CPU_FREQ_GOV_TRIPNDROID) += cpufreq_tripndroid.o
obj-$(CONFIG_CPU_FREQ_GOV_HYPER) += cpufreq_hyper.o
obj-$(CONFIG_CPU_BOOST) += cpu-boost.o

obj-$(CONFIG_GENERIC_CPUFREQ_CPU0) += cpufreq-cpu0.o
Expand Down

0 comments on commit 6779c3f

Please sign in to comment.