diff options
author | Chengming Zhou <zhouchengming@bytedance.com> | 2022-04-08 13:53:08 +0200 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2022-04-22 12:14:07 +0200 |
commit | 64eaf50731ac0a8c76ce2fedd50ef6652aabc5ff (patch) | |
tree | 9b41528f918883d9c8b9aa5dc87e03e021f482ab /kernel/sched/pelt.h | |
parent | sched/fair: Move calculate of avg_load to a better location (diff) | |
download | linux-64eaf50731ac0a8c76ce2fedd50ef6652aabc5ff.tar.xz linux-64eaf50731ac0a8c76ce2fedd50ef6652aabc5ff.zip |
sched/fair: Fix cfs_rq_clock_pelt() for throttled cfs_rq
Since commit 23127296889f ("sched/fair: Update scale invariance of PELT")
change to use rq_clock_pelt() instead of rq_clock_task(), we should also
use rq_clock_pelt() for throttled_clock_task_time and throttled_clock_task
accounting to get correct cfs_rq_clock_pelt() of throttled cfs_rq. And
rename throttled_clock_task(_time) to be clock_pelt rather than clock_task.
Fixes: 23127296889f ("sched/fair: Update scale invariance of PELT")
Signed-off-by: Chengming Zhou <zhouchengming@bytedance.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Ben Segall <bsegall@google.com>
Reviewed-by: Vincent Guittot <vincent.guittot@linaro.org>
Link: https://lore.kernel.org/r/20220408115309.81603-1-zhouchengming@bytedance.com
Diffstat (limited to 'kernel/sched/pelt.h')
-rw-r--r-- | kernel/sched/pelt.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/sched/pelt.h b/kernel/sched/pelt.h index c336f5f481bc..4ff2ed4f8fa1 100644 --- a/kernel/sched/pelt.h +++ b/kernel/sched/pelt.h @@ -145,9 +145,9 @@ static inline u64 rq_clock_pelt(struct rq *rq) static inline u64 cfs_rq_clock_pelt(struct cfs_rq *cfs_rq) { if (unlikely(cfs_rq->throttle_count)) - return cfs_rq->throttled_clock_task - cfs_rq->throttled_clock_task_time; + return cfs_rq->throttled_clock_pelt - cfs_rq->throttled_clock_pelt_time; - return rq_clock_pelt(rq_of(cfs_rq)) - cfs_rq->throttled_clock_task_time; + return rq_clock_pelt(rq_of(cfs_rq)) - cfs_rq->throttled_clock_pelt_time; } #else static inline u64 cfs_rq_clock_pelt(struct cfs_rq *cfs_rq) |