aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/sched/fair.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 748cb054fefd..e497c05aab7f 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -5386,6 +5386,14 @@ enqueue_task_fair(struct rq *rq, struct task_struct *p, int flags)
5386 struct sched_entity *se = &p->se; 5386 struct sched_entity *se = &p->se;
5387 5387
5388 /* 5388 /*
5389 * The code below (indirectly) updates schedutil which looks at
5390 * the cfs_rq utilization to select a frequency.
5391 * Let's add the task's estimated utilization to the cfs_rq's
5392 * estimated utilization, before we update schedutil.
5393 */
5394 util_est_enqueue(&rq->cfs, p);
5395
5396 /*
5389 * If in_iowait is set, the code below may not trigger any cpufreq 5397 * If in_iowait is set, the code below may not trigger any cpufreq
5390 * utilization updates, so do it here explicitly with the IOWAIT flag 5398 * utilization updates, so do it here explicitly with the IOWAIT flag
5391 * passed. 5399 * passed.
@@ -5426,7 +5434,6 @@ enqueue_task_fair(struct rq *rq, struct task_struct *p, int flags)
5426 if (!se) 5434 if (!se)
5427 add_nr_running(rq, 1); 5435 add_nr_running(rq, 1);
5428 5436
5429 util_est_enqueue(&rq->cfs, p);
5430 hrtick_update(rq); 5437 hrtick_update(rq);
5431} 5438}
5432 5439