|
@@ -540,7 +540,7 @@ again:
|
|
|
dl_se->dl_yielded = 0;
|
|
|
if (task_on_rq_queued(p)) {
|
|
|
enqueue_task_dl(rq, p, ENQUEUE_REPLENISH);
|
|
|
- if (task_has_dl_policy(rq->curr))
|
|
|
+ if (dl_task(rq->curr))
|
|
|
check_preempt_curr_dl(rq, p, 0);
|
|
|
else
|
|
|
resched_curr(rq);
|
|
@@ -1626,8 +1626,12 @@ static void switched_to_dl(struct rq *rq, struct task_struct *p)
|
|
|
/* Only reschedule if pushing failed */
|
|
|
check_resched = 0;
|
|
|
#endif /* CONFIG_SMP */
|
|
|
- if (check_resched && task_has_dl_policy(rq->curr))
|
|
|
- check_preempt_curr_dl(rq, p, 0);
|
|
|
+ if (check_resched) {
|
|
|
+ if (dl_task(rq->curr))
|
|
|
+ check_preempt_curr_dl(rq, p, 0);
|
|
|
+ else
|
|
|
+ resched_curr(rq);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|