@@ -7547,6 +7547,19 @@ static void update_blocked_averages(int cpu)
7547
7547
rq_lock_irqsave (rq , & rf );
7548
7548
update_rq_clock (rq );
7549
7549
7550
+ /*
7551
+ * update_cfs_rq_load_avg() can call cpufreq_update_util(). Make sure
7552
+ * that RT, DL and IRQ signals have been updated before updating CFS.
7553
+ */
7554
+ curr_class = rq -> curr -> sched_class ;
7555
+ update_rt_rq_load_avg (rq_clock_pelt (rq ), rq , curr_class == & rt_sched_class );
7556
+ update_dl_rq_load_avg (rq_clock_pelt (rq ), rq , curr_class == & dl_sched_class );
7557
+ update_irq_load_avg (rq , 0 );
7558
+
7559
+ /* Don't need periodic decay once load/util_avg are null */
7560
+ if (others_have_blocked (rq ))
7561
+ done = false;
7562
+
7550
7563
/*
7551
7564
* Iterates the task_group tree in a bottom up fashion, see
7552
7565
* list_add_leaf_cfs_rq() for details.
@@ -7574,14 +7587,6 @@ static void update_blocked_averages(int cpu)
7574
7587
done = false;
7575
7588
}
7576
7589
7577
- curr_class = rq -> curr -> sched_class ;
7578
- update_rt_rq_load_avg (rq_clock_pelt (rq ), rq , curr_class == & rt_sched_class );
7579
- update_dl_rq_load_avg (rq_clock_pelt (rq ), rq , curr_class == & dl_sched_class );
7580
- update_irq_load_avg (rq , 0 );
7581
- /* Don't need periodic decay once load/util_avg are null */
7582
- if (others_have_blocked (rq ))
7583
- done = false;
7584
-
7585
7590
update_blocked_load_status (rq , !done );
7586
7591
rq_unlock_irqrestore (rq , & rf );
7587
7592
}
@@ -7642,12 +7647,18 @@ static inline void update_blocked_averages(int cpu)
7642
7647
7643
7648
rq_lock_irqsave (rq , & rf );
7644
7649
update_rq_clock (rq );
7645
- update_cfs_rq_load_avg (cfs_rq_clock_pelt (cfs_rq ), cfs_rq );
7646
7650
7651
+ /*
7652
+ * update_cfs_rq_load_avg() can call cpufreq_update_util(). Make sure
7653
+ * that RT, DL and IRQ signals have been updated before updating CFS.
7654
+ */
7647
7655
curr_class = rq -> curr -> sched_class ;
7648
7656
update_rt_rq_load_avg (rq_clock_pelt (rq ), rq , curr_class == & rt_sched_class );
7649
7657
update_dl_rq_load_avg (rq_clock_pelt (rq ), rq , curr_class == & dl_sched_class );
7650
7658
update_irq_load_avg (rq , 0 );
7659
+
7660
+ update_cfs_rq_load_avg (cfs_rq_clock_pelt (cfs_rq ), cfs_rq );
7661
+
7651
7662
update_blocked_load_status (rq , cfs_rq_has_blocked (cfs_rq ) || others_have_blocked (rq ));
7652
7663
rq_unlock_irqrestore (rq , & rf );
7653
7664
}
0 commit comments