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:Joonwoo Park <joonwoop@codeaurora.org> Signed-off-by:
Patrick Bellasi <patrick.bellasi@arm.com> Signed-off-by:
Chris Redpath <chris.redpath@arm.com> Signed-off-by:
Quentin Perret <quentin.perret@arm.com>
Loading
Please register or sign in to comment