aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTodd Poynor2012-12-21 17:13:01 -0600
committerArve Hjønnevåg2013-02-19 19:56:11 -0600
commitcbdc46c07ce9dc9a4a3736051bd1c0187efedb59 (patch)
tree3d36d954f04207d39637137ea2fcc846579ece85
parent75cf0d0366245482c96d577bb0105329272ff6a3 (diff)
downloadkernel-common-cbdc46c07ce9dc9a4a3736051bd1c0187efedb59.tar.gz
kernel-common-cbdc46c07ce9dc9a4a3736051bd1c0187efedb59.tar.xz
kernel-common-cbdc46c07ce9dc9a4a3736051bd1c0187efedb59.zip
cpufreq: interactive: default go_hispeed_load 99%, doc updates
Update default go_hispeed_load from 85% to 99%. Recent changes to the governor now use a default target_load of 90%. go_hispeed_load should not be lower than the target load for hispeed_freq, which could lead to oscillating speed decisions. Other recent changes reduce the need to dampen speed jumps on load spikes, while input event boosts from userspace are the preferred method for anticipating load spikes with UI impacts. General update to the documentation to reflect recent changes. Change-Id: I1b92f3091f42c04b10503cd1169a943b5dfd6faf Signed-off-by: Todd Poynor <toddpoynor@google.com>
-rw-r--r--Documentation/cpu-freq/governors.txt64
-rw-r--r--drivers/cpufreq/cpufreq_interactive.c2
2 files changed, 33 insertions, 33 deletions
diff --git a/Documentation/cpu-freq/governors.txt b/Documentation/cpu-freq/governors.txt
index 712f24d0309..b4ae5e681a6 100644
--- a/Documentation/cpu-freq/governors.txt
+++ b/Documentation/cpu-freq/governors.txt
@@ -198,23 +198,8 @@ default value of '20' it means that if the CPU usage needs to be below
198 198
199The CPUfreq governor "interactive" is designed for latency-sensitive, 199The CPUfreq governor "interactive" is designed for latency-sensitive,
200interactive workloads. This governor sets the CPU speed depending on 200interactive workloads. This governor sets the CPU speed depending on
201usage, similar to "ondemand" and "conservative" governors. However, 201usage, similar to "ondemand" and "conservative" governors, but with a
202the governor is more aggressive about scaling the CPU speed up in 202different set of configurable behaviors.
203response to CPU-intensive activity.
204
205Sampling the CPU load every X ms can lead to under-powering the CPU
206for X ms, leading to dropped frames, stuttering UI, etc. Instead of
207sampling the cpu at a specified rate, the interactive governor will
208check whether to scale the cpu frequency up soon after coming out of
209idle. When the cpu comes out of idle, a timer is configured to fire
210within 1-2 ticks. If the cpu is very busy between exiting idle and
211when the timer fires then we assume the cpu is underpowered and ramp
212to MAX speed.
213
214If the cpu was not sufficiently busy to immediately ramp to MAX speed,
215then governor evaluates the cpu load since the last speed adjustment,
216choosing the highest value between that longer-term load or the
217short-term load since idle exit to determine the cpu speed to ramp to.
218 203
219The tuneable values for this governor are: 204The tuneable values for this governor are:
220 205
@@ -236,36 +221,51 @@ values also usually appear in an ascending order. The default is
236target load 90% for all speeds. 221target load 90% for all speeds.
237 222
238min_sample_time: The minimum amount of time to spend at the current 223min_sample_time: The minimum amount of time to spend at the current
239frequency before ramping down. This is to ensure that the governor has 224frequency before ramping down. Default is 80000 uS.
240seen enough historic cpu load data to determine the appropriate
241workload. Default is 80000 uS.
242 225
243hispeed_freq: An intermediate "hi speed" at which to initially ramp 226hispeed_freq: An intermediate "hi speed" at which to initially ramp
244when CPU load hits the value specified in go_hispeed_load. If load 227when CPU load hits the value specified in go_hispeed_load. If load
245stays high for the amount of time specified in above_hispeed_delay, 228stays high for the amount of time specified in above_hispeed_delay,
246then speed may be bumped higher. Default is maximum speed. 229then speed may be bumped higher. Default is the maximum speed
230allowed by the policy at governor initialization time.
247 231
248go_hispeed_load: The CPU load at which to ramp to the intermediate "hi 232go_hispeed_load: The CPU load at which to ramp to hispeed_freq.
249speed". Default is 85%. 233Default is 99%.
250 234
251above_hispeed_delay: Once speed is set to hispeed_freq, wait for this 235above_hispeed_delay: When speed is at or above hispeed_freq, wait for
252long before bumping speed higher in response to continued high load. 236this long before raising speed in response to continued high load.
253Default is 20000 uS. 237Default is 20000 uS.
254 238
255timer_rate: Sample rate for reevaluating cpu load when the system is 239timer_rate: Sample rate for reevaluating CPU load when the CPU is not
256not idle. Default is 20000 uS. 240idle. A deferrable timer is used, such that the CPU will not be woken
257 241from idle to service this timer until something else needs to run.
258input_boost: If non-zero, boost speed of all CPUs to hispeed_freq on 242(The maximum time to allow deferring this timer when not running at
259touchscreen activity. Default is 0. 243minimum speed is configurable via timer_slack.) Default is 20000 uS.
244
245timer_slack: Maximum additional time to defer handling the governor
246sampling timer beyond timer_rate when running at speeds above the
247minimum. For platforms that consume additional power at idle when
248CPUs are running at speeds greater than minimum, this places an upper
249bound on how long the timer will be deferred prior to re-evaluating
250load and dropping speed. For example, if timer_rate is 20000uS and
251timer_slack is 10000uS then timers will be deferred for up to 30msec
252when not at lowest speed. A value of -1 means defer timers
253indefinitely at all speeds. Default is 80000 uS.
260 254
261boost: If non-zero, immediately boost speed of all CPUs to at least 255boost: If non-zero, immediately boost speed of all CPUs to at least
262hispeed_freq until zero is written to this attribute. If zero, allow 256hispeed_freq until zero is written to this attribute. If zero, allow
263CPU speeds to drop below hispeed_freq according to load as usual. 257CPU speeds to drop below hispeed_freq according to load as usual.
258Default is zero.
264 259
265boostpulse: Immediately boost speed of all CPUs to hispeed_freq for 260boostpulse: On each write, immediately boost speed of all CPUs to
266min_sample_time, after which speeds are allowed to drop below 261hispeed_freq for at least the period of time specified by
262boostpulse_duration, after which speeds are allowed to drop below
267hispeed_freq according to load as usual. 263hispeed_freq according to load as usual.
268 264
265boostpulse_duration: Length of time to hold CPU speed at hispeed_freq
266on a write to boostpulse, before allowing speed to drop according to
267load as usual. Default is 80000 uS.
268
269 269
2703. The Governor Interface in the CPUfreq Core 2703. The Governor Interface in the CPUfreq Core
271============================================= 271=============================================
diff --git a/drivers/cpufreq/cpufreq_interactive.c b/drivers/cpufreq/cpufreq_interactive.c
index 4dc7f04391a..7ad6c003ac0 100644
--- a/drivers/cpufreq/cpufreq_interactive.c
+++ b/drivers/cpufreq/cpufreq_interactive.c
@@ -65,7 +65,7 @@ static spinlock_t speedchange_cpumask_lock;
65static unsigned int hispeed_freq; 65static unsigned int hispeed_freq;
66 66
67/* Go to hi speed when CPU load at or above this value. */ 67/* Go to hi speed when CPU load at or above this value. */
68#define DEFAULT_GO_HISPEED_LOAD 85 68#define DEFAULT_GO_HISPEED_LOAD 99
69static unsigned long go_hispeed_load; 69static unsigned long go_hispeed_load;
70 70
71/* Target load. Lower values result in higher CPU speeds. */ 71/* Target load. Lower values result in higher CPU speeds. */