mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
sched/pelt: Fix update of blocked PELT ordering
update_cfs_rq_load_avg() can call cpufreq_update_util() to trigger an update of the frequency. Make sure that RT, DL and IRQ PELT signals have been updated before calling cpufreq. Signed-off-by: Vincent Guittot <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Fixes:371bf42732("sched/rt: Add rt_rq utilization tracking") Fixes:3727e0e163("sched/dl: Add dl_rq utilization tracking") Fixes:91c27493e7("sched/irq: Add IRQ utilization tracking") Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
This commit is contained in:
parent
ff51ff84d8
commit
b90f7c9d21
1 changed files with 20 additions and 9 deletions
|
|
@ -7547,6 +7547,19 @@ static void update_blocked_averages(int cpu)
|
|||
rq_lock_irqsave(rq, &rf);
|
||||
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.
|
||||
|
|
@ -7574,14 +7587,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);
|
||||
}
|
||||
|
|
@ -7642,12 +7647,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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue