diff options
author | Ingo Molnar <mingo@kernel.org> | 2019-11-18 14:41:02 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2019-11-18 14:41:02 +0100 |
commit | b21feab0b865c36b24d7a60b55a10c7033b03159 (patch) | |
tree | 17085747485ffad55b90839b43646d453b8e5079 /kernel/sched/fair.c | |
parent | a9723389cc759c891d481de271ac73eeaa123bcb (diff) | |
parent | af42d3466bdc8f39806b26f593604fdc54140bcb (diff) | |
download | linux-stable-b21feab0b865c36b24d7a60b55a10c7033b03159.tar.gz linux-stable-b21feab0b865c36b24d7a60b55a10c7033b03159.tar.bz2 linux-stable-b21feab0b865c36b24d7a60b55a10c7033b03159.zip |
Merge tag 'v5.4-rc8' into sched/core, to pick up fixes and dependencies
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/sched/fair.c')
-rw-r--r-- | kernel/sched/fair.c | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 1f93d96dd06b..209cad663adf 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -7513,6 +7513,19 @@ static void update_blocked_averages(int cpu) update_rq_clock(rq); /* + * update_cfs_rq_load_avg() can call cpufreq_update_util(). Make sure + * that RT, DL and IRQ signals have been updated before updating CFS. + */ + curr_class = rq->curr->sched_class; + update_rt_rq_load_avg(rq_clock_pelt(rq), rq, curr_class == &rt_sched_class); + update_dl_rq_load_avg(rq_clock_pelt(rq), rq, curr_class == &dl_sched_class); + update_irq_load_avg(rq, 0); + + /* Don't need periodic decay once load/util_avg are null */ + if (others_have_blocked(rq)) + done = false; + + /* * Iterates the task_group tree in a bottom up fashion, see * list_add_leaf_cfs_rq() for details. */ @@ -7539,14 +7552,6 @@ static void update_blocked_averages(int cpu) done = false; } - curr_class = rq->curr->sched_class; - update_rt_rq_load_avg(rq_clock_pelt(rq), rq, curr_class == &rt_sched_class); - update_dl_rq_load_avg(rq_clock_pelt(rq), rq, curr_class == &dl_sched_class); - update_irq_load_avg(rq, 0); - /* Don't need periodic decay once load/util_avg are null */ - if (others_have_blocked(rq)) - done = false; - update_blocked_load_status(rq, !done); rq_unlock_irqrestore(rq, &rf); } @@ -7607,12 +7612,18 @@ static inline void update_blocked_averages(int cpu) rq_lock_irqsave(rq, &rf); update_rq_clock(rq); - update_cfs_rq_load_avg(cfs_rq_clock_pelt(cfs_rq), cfs_rq); + /* + * update_cfs_rq_load_avg() can call cpufreq_update_util(). Make sure + * that RT, DL and IRQ signals have been updated before updating CFS. + */ curr_class = rq->curr->sched_class; update_rt_rq_load_avg(rq_clock_pelt(rq), rq, curr_class == &rt_sched_class); update_dl_rq_load_avg(rq_clock_pelt(rq), rq, curr_class == &dl_sched_class); update_irq_load_avg(rq, 0); + + update_cfs_rq_load_avg(cfs_rq_clock_pelt(cfs_rq), cfs_rq); + update_blocked_load_status(rq, cfs_rq_has_blocked(cfs_rq) || others_have_blocked(rq)); rq_unlock_irqrestore(rq, &rf); } |