Skip to content

Commit a54cd4c

Browse files
committed
cpufreq: add lagfree governor based on ondemand
1 parent 1b7f7f3 commit a54cd4c

File tree

4 files changed

+710
-0
lines changed

4 files changed

+710
-0
lines changed

drivers/cpufreq/Kconfig

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,18 @@ config CPU_FREQ_DEFAULT_GOV_INTELLIDEMAND
149149
help
150150
Intelligent OnDemand Govneror based on Samsung Patched OnDemand
151151

152+
config CPU_FREQ_DEFAULT_GOV_LAGFREE
153+
bool "lagfree"
154+
select CPU_FREQ_GOV_LAGFREE
155+
select CPU_FREQ_GOV_PERFORMANCE
156+
help
157+
Use the CPUFreq governor 'lagfree' as default. This allows
158+
you to get a full dynamic frequency capable system by simply
159+
loading your cpufreq low-level hardware driver.
160+
Be aware that not all cpufreq drivers support the lagfree
161+
governor. If unsure have a look at the help section of the
162+
driver. Fallback governor will be the performance governor.
163+
152164
endchoice
153165

154166
config CPU_FREQ_GOV_PERFORMANCE
@@ -271,4 +283,36 @@ config CPU_FREQ_GOV_INTELLIDEMAND
271283
help
272284
'intellidemand' - an intelligent ondemand governor
273285

286+
config CPU_FREQ_GOV_LAGFREE
287+
tristate "'lagfree' cpufreq governor"
288+
depends on CPU_FREQ
289+
help
290+
'lagfree' - this driver is rather similar to the 'ondemand'
291+
governor both in its source code and its purpose, the difference is
292+
its optimisation for better suitability in a battery powered
293+
environment. The frequency is gracefully increased and decreased
294+
rather than jumping to 100% when speed is required.
295+
296+
To compile this driver as a module, choose M here: the
297+
module will be called cpufreq_lagfree.
298+
299+
For details, take a look at linux/Documentation/cpu-freq.
300+
301+
If in doubt, say N.
302+
303+
config CPU_FREQ_MIN_TICKS
304+
int "Ticks between governor polling interval."
305+
depends on CPU_FREQ_GOV_LAGFREE
306+
default 10
307+
help
308+
Minimum number of ticks between polling interval for governors.
309+
310+
config CPU_FREQ_SAMPLING_LATENCY_MULTIPLIER
311+
int "Sampling rate multiplier for governors."
312+
depends on CPU_FREQ_GOV_LAGFREE
313+
default 1000
314+
help
315+
Sampling latency rate multiplied by the cpu switch latency.
316+
Affects governor polling.
317+
274318
endif # CPU_FREQ

drivers/cpufreq/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ obj-$(CONFIG_CPU_FREQ_GOV_SMARTASS) += cpufreq_smartass.o
1515
obj-$(CONFIG_CPU_FREQ_GOV_SMARTASS) += cpufreq_smartass.o
1616
obj-$(CONFIG_CPU_FREQ_GOV_SMARTASS2) += cpufreq_smartass2.o
1717
obj-$(CONFIG_CPU_FREQ_GOV_INTELLIDEMAND)+= cpufreq_intellidemand.o
18+
obj-$(CONFIG_CPU_FREQ_GOV_LAGFREE) += cpufreq_lagfree.o
1819

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

0 commit comments

Comments
 (0)