Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit d283e80e authored by Dietmar Eggemann's avatar Dietmar Eggemann Committed by Chris Redpath
Browse files

ANDROID: drivers base/arch_topology: provide frequency-invariant accounting support



Implements the arch-specific (arm and arm64) frequency-invariance setter
function arch_set_freq_scale() which provides the following frequency
scaling factor:

  current_freq(cpu) << SCHED_CAPACITY_SHIFT / max_supported_freq(cpu)

One possible consumer of the frequency-invariance getter function
topology_get_freq_scale() is the Per-Entity Load Tracking (PELT)
mechanism of the task scheduler.

Allow inlining of topology_get_freq_scale() into the task scheduler
fast path (e.g. __update_load_avg_se()) by coding it as a static inline
function in the arch topology header file.

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Juri Lelli <juri.lelli@arm.com>
Signed-off-by: default avatarDietmar Eggemann <dietmar.eggemann@arm.com>
Change-Id: I7a0fadc160d85daf9e35e346391c5d0bb9167d71
Signed-off-by: default avatarChris Redpath <chris.redpath@arm.com>
parent 768aa8c4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment