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

Skip to content
Commit 3b9305de authored by Patrick Bellasi's avatar Patrick Bellasi Committed by Quentin Perret
Browse files

sched/fair: reduce rounding errors in energy computations



The SG's energy is obtained by adding busy and idle contributions which
are computed by considering a proper fraction of the
SCHED_CAPACITY_SCALE defined by the SG's utilizations.

By scaling each and every contribution conputed we risk to accumulate
rounding errors which can results into a non null energy_delta also in
cases when the same total accomulated utilization is differently
distributed among different CPUs.

To reduce rouding errors, this patch accumulated non-scaled busy/idle
energy contributions for each visited SG, and scale each of them just
one time at the end.

Change-Id: Idf8367fee0ac11938c6436096f0c1b2d630210d2
Suggested-by: default avatarJoonwoo Park <joonwoop@codeaurora.org>
Signed-off-by: default avatarPatrick Bellasi <patrick.bellasi@arm.com>
Signed-off-by: default avatarChris Redpath <chris.redpath@arm.com>
Signed-off-by: default avatarQuentin Perret <quentin.perret@arm.com>
parent cf28cf03
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