return now;
}
+#define MAX_LOCAL_LOAD 100
static void cpufreq_interactive_timer(unsigned long data)
{
u64 now;
boosted = tunables->boost_val || now < tunables->boostpulse_endtime;
if (cpu_load >= tunables->go_hispeed_load || boosted) {
- if (pcpu->target_freq < tunables->hispeed_freq) {
+ if (pcpu->target_freq < tunables->hispeed_freq&&
+ cpu_load <= MAX_LOCAL_LOAD) {
new_freq = tunables->hispeed_freq;
} else {
new_freq = choose_freq(pcpu, loadadjfreq);
new_freq = tunables->hispeed_freq;
}
- if (pcpu->target_freq >= tunables->hispeed_freq &&
+ if (cpu_load <= MAX_LOCAL_LOAD &&
+ pcpu->target_freq >= tunables->hispeed_freq &&
new_freq > pcpu->target_freq &&
now - pcpu->hispeed_validate_time <
freq_to_above_hispeed_delay(tunables, pcpu->target_freq)) {