summaryrefslogtreecommitdiff
path: root/drivers/base/power/qos.c
diff options
context:
space:
mode:
authorJoonwoo Park <joonwoop@codeaurora.org>2017-07-24 13:23:05 +0100
committerJoonwoo Park <joonwoop@codeaurora.org>2017-09-01 17:23:56 -0700
commit11b618a0b2fc8598474a518add7037d4005d83e8 (patch)
treecf84ea0df7a747ad99c7131279b2d063ef89cbfb /drivers/base/power/qos.c
parent94e5c965075b55a5dfd1c4cce580e2dfb0c7ffc3 (diff)
sched: EAS: fix incorrect energy delta calculation due to rounding error
In order to calculate energy difference we currently iterates CPUs under the same sched doamin to accumulate total energy cost and compare before and after : for_each_domain(cpu) total_energy_before += (cpu_util * power) >> SCHED_CAPACITY_SHIFT; for_each_domain(cpu) total_energy_after += (cpu_util * power) >> SCHED_CAPACITY_SHIFT; Doing such can incorrectly calculate and report abs(delta) > 0 when there is actually no energy delta between before and after because the same total accumulated cpu_util of all the CPUs can be distributed differently before and after and it causes different amount of rounding error. Fix such incorrectness by shifting just once with accumulated total_energy. Change-Id: I82f1e2e358367058960938b4ef81714f57e921cf Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org> (moved part to another commit) Signed-off-by: Chris Redpath <chris.redpath@arm.com>
Diffstat (limited to 'drivers/base/power/qos.c')
0 files changed, 0 insertions, 0 deletions