File tree Expand file tree Collapse file tree 2 files changed +10
-9
lines changed Expand file tree Collapse file tree 2 files changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -86,6 +86,8 @@ void add_running_bw(u64 dl_bw, struct dl_rq *dl_rq)
86
86
dl_rq -> running_bw += dl_bw ;
87
87
SCHED_WARN_ON (dl_rq -> running_bw < old ); /* overflow */
88
88
SCHED_WARN_ON (dl_rq -> running_bw > dl_rq -> this_bw );
89
+ /* kick cpufreq (see the comment in kernel/sched/sched.h). */
90
+ cpufreq_update_util (rq_of_dl_rq (dl_rq ), SCHED_CPUFREQ_DL );
89
91
}
90
92
91
93
static inline
@@ -98,6 +100,8 @@ void sub_running_bw(u64 dl_bw, struct dl_rq *dl_rq)
98
100
SCHED_WARN_ON (dl_rq -> running_bw > old ); /* underflow */
99
101
if (dl_rq -> running_bw > old )
100
102
dl_rq -> running_bw = 0 ;
103
+ /* kick cpufreq (see the comment in kernel/sched/sched.h). */
104
+ cpufreq_update_util (rq_of_dl_rq (dl_rq ), SCHED_CPUFREQ_DL );
101
105
}
102
106
103
107
static inline
@@ -1134,9 +1138,6 @@ static void update_curr_dl(struct rq *rq)
1134
1138
return ;
1135
1139
}
1136
1140
1137
- /* kick cpufreq (see the comment in kernel/sched/sched.h). */
1138
- cpufreq_update_util (rq , SCHED_CPUFREQ_DL );
1139
-
1140
1141
schedstat_set (curr -> se .statistics .exec_max ,
1141
1142
max (curr -> se .statistics .exec_max , delta_exec ));
1142
1143
Original file line number Diff line number Diff line change @@ -2055,14 +2055,14 @@ DECLARE_PER_CPU(struct update_util_data *, cpufreq_update_util_data);
2055
2055
* The way cpufreq is currently arranged requires it to evaluate the CPU
2056
2056
* performance state (frequency/voltage) on a regular basis to prevent it from
2057
2057
* being stuck in a completely inadequate performance level for too long.
2058
- * That is not guaranteed to happen if the updates are only triggered from CFS,
2059
- * though, because they may not be coming in if RT or deadline tasks are active
2060
- * all the time (or there are RT and DL tasks only).
2058
+ * That is not guaranteed to happen if the updates are only triggered from CFS
2059
+ * and DL, though, because they may not be coming in if only RT tasks are
2060
+ * active all the time (or there are RT tasks only).
2061
2061
*
2062
- * As a workaround for that issue, this function is called by the RT and DL
2063
- * sched classes to trigger extra cpufreq updates to prevent it from stalling,
2062
+ * As a workaround for that issue, this function is called periodically by the
2063
+ * RT sched class to trigger extra cpufreq updates to prevent it from stalling,
2064
2064
* but that really is a band-aid. Going forward it should be replaced with
2065
- * solutions targeted more specifically at RT and DL tasks.
2065
+ * solutions targeted more specifically at RT tasks.
2066
2066
*/
2067
2067
static inline void cpufreq_update_util (struct rq * rq , unsigned int flags )
2068
2068
{
You can’t perform that action at this time.
0 commit comments