diff options
-rw-r--r-- | kernel/sched_fair.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c index fb8994c6d4bb..8264bb5dbd51 100644 --- a/kernel/sched_fair.c +++ b/kernel/sched_fair.c | |||
@@ -1348,6 +1348,13 @@ static void check_preempt_wakeup(struct rq *rq, struct task_struct *p) | |||
1348 | if (unlikely(se == pse)) | 1348 | if (unlikely(se == pse)) |
1349 | return; | 1349 | return; |
1350 | 1350 | ||
1351 | /* | ||
1352 | * We can come here with TIF_NEED_RESCHED already set from new task | ||
1353 | * wake up path. | ||
1354 | */ | ||
1355 | if (test_tsk_need_resched(curr)) | ||
1356 | return; | ||
1357 | |||
1351 | cfs_rq_of(pse)->next = pse; | 1358 | cfs_rq_of(pse)->next = pse; |
1352 | 1359 | ||
1353 | /* | 1360 | /* |
@@ -1620,10 +1627,10 @@ static void task_new_fair(struct rq *rq, struct task_struct *p) | |||
1620 | * 'current' within the tree based on its new key value. | 1627 | * 'current' within the tree based on its new key value. |
1621 | */ | 1628 | */ |
1622 | swap(curr->vruntime, se->vruntime); | 1629 | swap(curr->vruntime, se->vruntime); |
1630 | resched_task(rq->curr); | ||
1623 | } | 1631 | } |
1624 | 1632 | ||
1625 | enqueue_task_fair(rq, p, 0); | 1633 | enqueue_task_fair(rq, p, 0); |
1626 | resched_task(rq->curr); | ||
1627 | } | 1634 | } |
1628 | 1635 | ||
1629 | /* | 1636 | /* |