Skip to content
This repository has been archived by the owner on Dec 28, 2020. It is now read-only.

Commit

Permalink
clk: qcom: clk-cpu-osm: Limit performance cluster to 2323200 kHz
Browse files Browse the repository at this point in the history
On the performance cluster, all frequencies above 2323200 kHz use an obscene
amount of power compared to 2323200 kHz. Using an AES-based CPU benchmark in
the kernel, it was found that 2323200 kHz yields 89.4% the performance of the
2649600 kHz frequency, while using only 53.5% as much power.

Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
Signed-off-by: Adam W. Willis <return.of.octobot@gmail.com>
  • Loading branch information
kerneltoast authored and 0ctobot committed Feb 21, 2019
1 parent 51acb77 commit 69aac76
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions drivers/clk/qcom/clk-cpu-osm.c
Original file line number Diff line number Diff line change
Expand Up @@ -785,6 +785,17 @@ static int osm_cpufreq_cpu_init(struct cpufreq_policy *policy)
if (core_count != parent->max_core_count)
table[i].frequency = CPUFREQ_ENTRY_INVALID;

/*
* Limit perfcl to 2323200 kHz to save power, since all
* frequencies above that on perfcl use an exponentially higher
* amount of power.
*/
if (cpumask_intersects(get_cpu_mask(policy->cpu),
cpu_perf_mask)) {
if (table[i].frequency > 2323200)
break;
}

/*
* Two of the same frequencies with the same core counts means
* end of table.
Expand Down

0 comments on commit 69aac76

Please sign in to comment.