diff options
author | Vincent Guittot <vincent.guittot@linaro.org> | 2020-06-12 17:47:03 +0200 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2020-06-15 14:10:06 +0200 |
commit | 87e867b4269f29dac8190bca13912d08163a277f (patch) | |
tree | b41a7a09c81a71c0985f8fc820b903fbc836b29c /kernel/sched/pelt.c | |
parent | sched/deadline: Fix a typo in a comment (diff) | |
download | linux-87e867b4269f29dac8190bca13912d08163a277f.tar.xz linux-87e867b4269f29dac8190bca13912d08163a277f.zip |
sched/pelt: Cleanup PELT divider
Factorize in a single place the calculation of the divider to be used to
to compute *_avg from *_sum value
Suggested-by: Dietmar Eggemann <dietmar.eggemann@arm.com>
Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20200612154703.23555-1-vincent.guittot@linaro.org
Diffstat (limited to 'kernel/sched/pelt.c')
-rw-r--r-- | kernel/sched/pelt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/sched/pelt.c b/kernel/sched/pelt.c index dea5567e4f72..11bea3b08115 100644 --- a/kernel/sched/pelt.c +++ b/kernel/sched/pelt.c @@ -262,7 +262,7 @@ ___update_load_sum(u64 now, struct sched_avg *sa, static __always_inline void ___update_load_avg(struct sched_avg *sa, unsigned long load) { - u32 divider = LOAD_AVG_MAX - 1024 + sa->period_contrib; + u32 divider = get_pelt_divider(sa); /* * Step 2: update *_avg. |