Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8e1ac42

Browse files
Quentin PerretPeter Zijlstra
Quentin Perret
authored and
Peter Zijlstra
committed
sched/fair: Fix overutilized update in enqueue_task_fair()
enqueue_task_fair() attempts to skip the overutilized update for newtasks as their util_avg is not accurate yet. However, the flag we checkto do so is overwritten earlier on in the function, which makes thecondition pretty much a nop.Fix this by saving the flag early on.Fixes:2802bf3 ("sched/fair: Add over-utilization/tipping point indicator")Reported-by: Rick Yiu <rickyiu@google.com>Signed-off-by: Quentin Perret <qperret@google.com>Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>Reviewed-by: Vincent Guittot <vincent.guittot@linaro.org>Reviewed-by: Valentin Schneider <valentin.schneider@arm.com>Link:https://lkml.kernel.org/r/20201112111201.2081902-1-qperret@google.com
1 parent8d4d9c7 commit8e1ac42

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎kernel/sched/fair.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5477,6 +5477,7 @@ enqueue_task_fair(struct rq *rq, struct task_struct *p, int flags)
54775477
structcfs_rq*cfs_rq;
54785478
structsched_entity*se=&p->se;
54795479
intidle_h_nr_running=task_has_idle_policy(p);
5480+
inttask_new= !(flags&ENQUEUE_WAKEUP);
54805481

54815482
/*
54825483
* The code below (indirectly) updates schedutil which looks at
@@ -5549,7 +5550,7 @@ enqueue_task_fair(struct rq *rq, struct task_struct *p, int flags)
55495550
* into account, but that is not straightforward to implement,
55505551
* and the following generally works well enough in practice.
55515552
*/
5552-
if (flags&ENQUEUE_WAKEUP)
5553+
if (!task_new)
55535554
update_overutilized_status(rq);
55545555

55555556
enqueue_throttle:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp