Skip to content

Commit

Permalink
cpufreq: Force the LITTLE cluster to only use the default governor
Browse files Browse the repository at this point in the history
Since the LITTLE cluster now only has two frequencies, both of which are
very close to one another, it doesn't make much sense to keep schedutil
running for it when there's almost no power difference between the two
frequencies. As such, force the LITTLE cluster to stick to the default
CPU governor, which is always sanely set to performance.

Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
Signed-off-by: v4lkyr <valkyr23@gmail.com>
Signed-off-by: Tashfin Shakeer Rhythm <tashfinshakeerrhythm@gmail.com>
  • Loading branch information
kerneltoast authored and Tashar02 committed Feb 28, 2022
1 parent ba6eac9 commit 87b06f9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions drivers/cpufreq/cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -780,6 +780,13 @@ static ssize_t store_scaling_governor(struct cpufreq_policy *policy,
char str_governor[16];
struct cpufreq_policy new_policy;

/*
* Force the LITTLE CPU cluster to use the default govenor (performance)
* because keeping it at its maximum frequency is best.
*/
if (cpumask_test_cpu(policy->cpu, cpu_lp_mask))
return count;

memcpy(&new_policy, policy, sizeof(*policy));

ret = sscanf(buf, "%15s", str_governor);
Expand Down

0 comments on commit 87b06f9

Please sign in to comment.