Revert "sched/fair: Ensure _sum and _avg values stay consistent"

This reverts commit 20285dc271, which
causes serious performance downgrade because the calculated cpu
frequency will be much lower than before due to change of cpu util.

Bug: 205915994
Test: build pass
Change-Id: I68dced7a58547a3324fcfeebea6c02bb30c4182d
Signed-off-by: Rick Yiu <rickyiu@google.com>
This commit is contained in:
Rick Yiu
2021-11-16 12:25:03 +08:00
committed by Todd Kjos
parent 7a7b5f89d9
commit 8630facf34

View File

@@ -3682,15 +3682,15 @@ update_cfs_rq_load_avg(u64 now, struct cfs_rq *cfs_rq)
r = removed_load;
sub_positive(&sa->load_avg, r);
sa->load_sum = sa->load_avg * divider;
sub_positive(&sa->load_sum, r * divider);
r = removed_util;
sub_positive(&sa->util_avg, r);
sa->util_sum = sa->util_avg * divider;
sub_positive(&sa->util_sum, r * divider);
r = removed_runnable;
sub_positive(&sa->runnable_avg, r);
sa->runnable_sum = sa->runnable_avg * divider;
sub_positive(&sa->runnable_sum, r * divider);
/*
* removed_runnable is the unweighted version of removed_load so we