]> git.baikalelectronics.ru Git - kernel.git/commit
sched/pelt: Ensure that *_sum is always synced with *_avg
authorVincent Guittot <vincent.guittot@linaro.org>
Tue, 1 Jun 2021 08:58:32 +0000 (10:58 +0200)
committerPeter Zijlstra <peterz@infradead.org>
Thu, 3 Jun 2021 10:55:55 +0000 (12:55 +0200)
commitbf42753b70daa4fd2162f16bba34f651d382a5bc
tree22924383c5f369cfcd524254379cf6f86a7b6dc1
parentdabc41438474de1b24b0dbf1dd4db8af356e0c13
sched/pelt: Ensure that *_sum is always synced with *_avg

Rounding in PELT calculation happening when entities are attached/detached
of a cfs_rq can result into situations where util/runnable_avg is not null
but util/runnable_sum is. This is normally not possible so we need to
ensure that util/runnable_sum stays synced with util/runnable_avg.

detach_entity_load_avg() is the last place where we don't sync
util/runnable_sum with util/runnbale_avg when moving some sched_entities

Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20210601085832.12626-1-vincent.guittot@linaro.org
kernel/sched/fair.c