aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/cpu-freq/governors.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/cpu-freq/governors.txt')
-rw-r--r--Documentation/cpu-freq/governors.txt44
1 files changed, 42 insertions, 2 deletions
diff --git a/Documentation/cpu-freq/governors.txt b/Documentation/cpu-freq/governors.txt
index c7a2eb8450c..51b1cd360c3 100644
--- a/Documentation/cpu-freq/governors.txt
+++ b/Documentation/cpu-freq/governors.txt
@@ -28,6 +28,7 @@ Contents:
282.3 Userspace 282.3 Userspace
292.4 Ondemand 292.4 Ondemand
302.5 Conservative 302.5 Conservative
312.6 Interactive
31 32
323. The Governor Interface in the CPUfreq Core 333. The Governor Interface in the CPUfreq Core
33 34
@@ -127,12 +128,12 @@ in the bash (as said, 1000 is default), do:
127echo `$(($(cat cpuinfo_transition_latency) * 750 / 1000)) \ 128echo `$(($(cat cpuinfo_transition_latency) * 750 / 1000)) \
128 >ondemand/sampling_rate 129 >ondemand/sampling_rate
129 130
130sampling_rate_min: 131show_sampling_rate_min:
131The sampling rate is limited by the HW transition latency: 132The sampling rate is limited by the HW transition latency:
132transition_latency * 100 133transition_latency * 100
133Or by kernel restrictions: 134Or by kernel restrictions:
134If CONFIG_NO_HZ is set, the limit is 10ms fixed. 135If CONFIG_NO_HZ is set, the limit is 10ms fixed.
135If CONFIG_NO_HZ is not set or nohz=off boot parameter is used, the 136If CONFIG_NO_HZ is not set or no_hz=off boot parameter is used, the
136limits depend on the CONFIG_HZ option: 137limits depend on the CONFIG_HZ option:
137HZ=1000: min=20000us (20ms) 138HZ=1000: min=20000us (20ms)
138HZ=250: min=80000us (80ms) 139HZ=250: min=80000us (80ms)
@@ -140,6 +141,8 @@ HZ=100: min=200000us (200ms)
140The highest value of kernel and HW latency restrictions is shown and 141The highest value of kernel and HW latency restrictions is shown and
141used as the minimum sampling rate. 142used as the minimum sampling rate.
142 143
144show_sampling_rate_max: THIS INTERFACE IS DEPRECATED, DON'T USE IT.
145
143up_threshold: defines what the average CPU usage between the samplings 146up_threshold: defines what the average CPU usage between the samplings
144of 'sampling_rate' needs to be for the kernel to make a decision on 147of 'sampling_rate' needs to be for the kernel to make a decision on
145whether it should increase the frequency. For example when it is set 148whether it should increase the frequency. For example when it is set
@@ -191,6 +194,43 @@ governor but for the opposite direction. For example when set to its
191default value of '20' it means that if the CPU usage needs to be below 194default value of '20' it means that if the CPU usage needs to be below
19220% between samples to have the frequency decreased. 19520% between samples to have the frequency decreased.
193 196
197
1982.6 Interactive
199---------------
200
201The CPUfreq governor "interactive" is designed for latency-sensitive,
202interactive workloads. This governor sets the CPU speed depending on
203usage, similar to "ondemand" and "conservative" governors. However,
204the governor is more aggressive about scaling the CPU speed up in
205response to CPU-intensive activity.
206
207Sampling the CPU load every X ms can lead to under-powering the CPU
208for X ms, leading to dropped frames, stuttering UI, etc. Instead of
209sampling the cpu at a specified rate, the interactive governor will
210check whether to scale the cpu frequency up soon after coming out of
211idle. When the cpu comes out of idle, a timer is configured to fire
212within 1-2 ticks. If the cpu is very busy between exiting idle and
213when the timer fires then we assume the cpu is underpowered and ramp
214to MAX speed.
215
216If the cpu was not sufficiently busy to immediately ramp to MAX speed,
217then governor evaluates the cpu load since the last speed adjustment,
218choosing the highest value between that longer-term load or the
219short-term load since idle exit to determine the cpu speed to ramp to.
220
221The tuneable values for this governor are:
222
223min_sample_time: The minimum amount of time to spend at the current
224frequency before ramping down. This is to ensure that the governor has
225seen enough historic cpu load data to determine the appropriate
226workload. Default is 80000 uS.
227
228go_maxspeed_load: The CPU load at which to ramp to max speed. Default
229is 85.
230
231timer_rate: Sample rate for reevaluating cpu load when the system is
232not idle. Default is 30000 uS.
233
1943. The Governor Interface in the CPUfreq Core 2343. The Governor Interface in the CPUfreq Core
195============================================= 235=============================================
196 236