Commit 7ceb771
sched/pelt: Continue to relax the sync of util_sum with util_avg
Rick reported performance regressions in bugzilla because of cpu frequency
being lower than before:
https://bugzilla.kernel.org/show_bug.cgi?id=215045
He bisected the problem to:
commit 1c35b07 ("sched/fair: Ensure _sum and _avg values stay consistent")
This commit forces util_sum to be synced with the new util_avg after
removing the contribution of a task and before the next periodic sync. By
doing so util_sum is rounded to its lower bound and might lost up to
LOAD_AVG_MAX-1 of accumulated contribution which has not yet been
reflected in util_avg.
update_tg_cfs_util() is not the only place where we round util_sum and
lost some accumulated contributions that are not already reflected in
util_avg. Modify update_tg_cfs_util() and detach_entity_load_avg() to not
sync util_sum with the new util_avg. Instead of always setting util_sum to
the low bound of util_avg, which can significantly lower the utilization,
we propagate the difference. In addition, we also check that cfs's util_sum
always stays above the lower bound for a given util_avg as it has been
observed that sched_entity's util_sum is sometimes above cfs one.
Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Dietmar Eggemann <dietmar.eggemann@arm.com>
Tested-by: Sachin Sant <sachinp@linux.ibm.com>
Link: https://lkml.kernel.org/r/20220111134659.24961-3-vincent.guittot@linaro.org1 parent 98b0d89 commit 7ceb771
1 file changed
Lines changed: 18 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3451 | 3451 | | |
3452 | 3452 | | |
3453 | 3453 | | |
3454 | | - | |
3455 | | - | |
| 3454 | + | |
| 3455 | + | |
3456 | 3456 | | |
3457 | 3457 | | |
3458 | | - | |
| 3458 | + | |
3459 | 3459 | | |
3460 | 3460 | | |
3461 | 3461 | | |
| |||
3464 | 3464 | | |
3465 | 3465 | | |
3466 | 3466 | | |
| 3467 | + | |
3467 | 3468 | | |
3468 | 3469 | | |
3469 | | - | |
| 3470 | + | |
| 3471 | + | |
| 3472 | + | |
3470 | 3473 | | |
3471 | 3474 | | |
3472 | | - | |
3473 | | - | |
| 3475 | + | |
| 3476 | + | |
| 3477 | + | |
| 3478 | + | |
| 3479 | + | |
| 3480 | + | |
3474 | 3481 | | |
3475 | 3482 | | |
3476 | 3483 | | |
| |||
3790 | 3797 | | |
3791 | 3798 | | |
3792 | 3799 | | |
3793 | | - | |
| 3800 | + | |
| 3801 | + | |
| 3802 | + | |
| 3803 | + | |
| 3804 | + | |
3794 | 3805 | | |
3795 | 3806 | | |
3796 | 3807 | | |
| |||
0 commit comments