cpufreq: interactive: use CPUFREQ_RELATION_C to choose closest frequency insted of...
authorDanny Wood <danwood76@gmail.com>
Sun, 31 Mar 2019 08:41:21 +0000 (09:41 +0100)
committerDanny Wood <danwood76@gmail.com>
Sun, 31 Mar 2019 09:24:16 +0000 (10:24 +0100)
drivers/cpufreq/cpufreq_interactive.c

index 3e7d5394c42393cbc84e65281d24605e40c287ed..78b7bf39760d325d4d2a454332af5411a263e4d9 100644 (file)
@@ -264,7 +264,7 @@ static unsigned int choose_freq(struct cpufreq_interactive_cpuinfo *pcpu,
 
                if (cpufreq_frequency_table_target(
                            pcpu->policy, pcpu->freq_table, loadadjfreq / tl,
-                           CPUFREQ_RELATION_L, &index))
+                           CPUFREQ_RELATION_C, &index))
                        break;
                freq = pcpu->freq_table[index].frequency;
 
@@ -306,7 +306,7 @@ static unsigned int choose_freq(struct cpufreq_interactive_cpuinfo *pcpu,
                                 */
                                if (cpufreq_frequency_table_target(
                                            pcpu->policy, pcpu->freq_table,
-                                           freqmin + 1, CPUFREQ_RELATION_L,
+                                           freqmin + 1, CPUFREQ_RELATION_C,
                                            &index))
                                        break;
                                freq = pcpu->freq_table[index].frequency;
@@ -425,7 +425,7 @@ static void cpufreq_interactive_timer(unsigned long data)
        pcpu->hispeed_validate_time = now;
 
        if (cpufreq_frequency_table_target(pcpu->policy, pcpu->freq_table,
-                                          new_freq, CPUFREQ_RELATION_L,
+                                          new_freq, CPUFREQ_RELATION_C,
                                           &index)) {
                spin_unlock_irqrestore(&pcpu->target_freq_lock, flags);
                goto rearm;
@@ -1400,7 +1400,7 @@ static int cpufreq_governor_interactive(struct cpufreq_policy *policy,
                                        policy->max, CPUFREQ_RELATION_H);
                else if (policy->min > policy->cur)
                        __cpufreq_driver_target(policy,
-                                       policy->min, CPUFREQ_RELATION_L);
+                                       policy->min, CPUFREQ_RELATION_C);
                for_each_cpu(j, policy->cpus) {
                        pcpu = &per_cpu(cpuinfo, j);