aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched_fair.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/sched_fair.c')
-rw-r--r--kernel/sched_fair.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index 36b5e34fa99e..56c0efe902a7 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -492,6 +492,8 @@ static void update_curr(struct cfs_rq *cfs_rq)
492 * overflow on 32 bits): 492 * overflow on 32 bits):
493 */ 493 */
494 delta_exec = (unsigned long)(now - curr->exec_start); 494 delta_exec = (unsigned long)(now - curr->exec_start);
495 if (!delta_exec)
496 return;
495 497
496 __update_curr(cfs_rq, curr, delta_exec); 498 __update_curr(cfs_rq, curr, delta_exec);
497 curr->exec_start = now; 499 curr->exec_start = now;
@@ -1361,12 +1363,11 @@ static void check_preempt_wakeup(struct rq *rq, struct task_struct *p, int sync)
1361{ 1363{
1362 struct task_struct *curr = rq->curr; 1364 struct task_struct *curr = rq->curr;
1363 struct sched_entity *se = &curr->se, *pse = &p->se; 1365 struct sched_entity *se = &curr->se, *pse = &p->se;
1366 struct cfs_rq *cfs_rq = task_cfs_rq(curr);
1364 1367
1365 if (unlikely(rt_prio(p->prio))) { 1368 update_curr(cfs_rq);
1366 struct cfs_rq *cfs_rq = task_cfs_rq(curr);
1367 1369
1368 update_rq_clock(rq); 1370 if (unlikely(rt_prio(p->prio))) {
1369 update_curr(cfs_rq);
1370 resched_task(curr); 1371 resched_task(curr);
1371 return; 1372 return;
1372 } 1373 }