author | Todd Poynor <toddpoynor@google.com> | |
Wed, 3 Oct 2012 07:39:56 +0000 (00:39 -0700) | ||
committer | Arve Hjønnevåg <arve@android.com> | |
Wed, 20 Feb 2013 01:55:29 +0000 (17:55 -0800) | ||
commit | 1dc2109579bff7ee5826e361137ba93da4f5b781 | |
tree | 73c61fc446d944fd2a7d994f303d17f422ca0a69 | tree | snapshot (tar.xz tar.gz zip) |
parent | 7700763dbd5efacf1920c06900512eb4b9e259ef | commit | diff |
cpufreq: interactive: run at fraction of hispeed_freq when load is low
When load is below go_hispeed_load, apply the percentage of CPU load to
a max frequency of hispeed_freq instead of the max speed. This avoids
jumping too quickly to hispeed_freq when it is a relatively low
percentage of max speed. This also allows go_hispeed_load to be set to
a high percentage relative to hispeed_freq (as a percentage of max speed,
again useful when hispeed_freq is a low fraction of max speed), to cap
larger loads at hispeed_freq. For example, a load of 60% will typically
move to 60% of hispeed_freq, not 60% of max speed. This causes the
governor to apply two different speed caps, depending on whether load is
below or above go_hispeed_load.
Also fix the type of hispeed_freq, which was u64, to match other
speed data types (and avoid overhead and allow division).
Change-Id: Ie2d0668be161c074aaad77db2037505431457b3a
Signed-off-by: Todd Poynor <toddpoynor@google.com>
When load is below go_hispeed_load, apply the percentage of CPU load to
a max frequency of hispeed_freq instead of the max speed. This avoids
jumping too quickly to hispeed_freq when it is a relatively low
percentage of max speed. This also allows go_hispeed_load to be set to
a high percentage relative to hispeed_freq (as a percentage of max speed,
again useful when hispeed_freq is a low fraction of max speed), to cap
larger loads at hispeed_freq. For example, a load of 60% will typically
move to 60% of hispeed_freq, not 60% of max speed. This causes the
governor to apply two different speed caps, depending on whether load is
below or above go_hispeed_load.
Also fix the type of hispeed_freq, which was u64, to match other
speed data types (and avoid overhead and allow division).
Change-Id: Ie2d0668be161c074aaad77db2037505431457b3a
Signed-off-by: Todd Poynor <toddpoynor@google.com>
drivers/cpufreq/cpufreq_interactive.c | diff | blob | history |