From 95597808db3c8b597545d7a57865466be5948d3e Mon Sep 17 00:00:00 2001 From: Danny Wood Date: Sun, 31 Mar 2019 09:41:21 +0100 Subject: [PATCH] cpufreq: interactive: use CPUFREQ_RELATION_C to choose closest frequency insted of lowest --- drivers/cpufreq/cpufreq_interactive.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/cpufreq/cpufreq_interactive.c b/drivers/cpufreq/cpufreq_interactive.c index 3e7d5394c42..78b7bf39760 100644 --- a/drivers/cpufreq/cpufreq_interactive.c +++ b/drivers/cpufreq/cpufreq_interactive.c @@ -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); -- 2.20.1