diff options
Diffstat (limited to 'kernel/sched/deadline.c')
-rw-r--r-- | kernel/sched/deadline.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c index a84299f44b5d..755bd3f1a1a9 100644 --- a/kernel/sched/deadline.c +++ b/kernel/sched/deadline.c | |||
@@ -1392,17 +1392,19 @@ static void enqueue_task_dl(struct rq *rq, struct task_struct *p, int flags) | |||
1392 | struct sched_dl_entity *pi_se = &p->dl; | 1392 | struct sched_dl_entity *pi_se = &p->dl; |
1393 | 1393 | ||
1394 | /* | 1394 | /* |
1395 | * Use the scheduling parameters of the top pi-waiter | 1395 | * Use the scheduling parameters of the top pi-waiter task if: |
1396 | * task if we have one and its (absolute) deadline is | 1396 | * - we have a top pi-waiter which is a SCHED_DEADLINE task AND |
1397 | * smaller than our one... OTW we keep our runtime and | 1397 | * - our dl_boosted is set (i.e. the pi-waiter's (absolute) deadline is |
1398 | * deadline. | 1398 | * smaller than our deadline OR we are a !SCHED_DEADLINE task getting |
1399 | * boosted due to a SCHED_DEADLINE pi-waiter). | ||
1400 | * Otherwise we keep our runtime and deadline. | ||
1399 | */ | 1401 | */ |
1400 | if (pi_task && p->dl.dl_boosted && dl_prio(pi_task->normal_prio)) { | 1402 | if (pi_task && dl_prio(pi_task->normal_prio) && p->dl.dl_boosted) { |
1401 | pi_se = &pi_task->dl; | 1403 | pi_se = &pi_task->dl; |
1402 | } else if (!dl_prio(p->normal_prio)) { | 1404 | } else if (!dl_prio(p->normal_prio)) { |
1403 | /* | 1405 | /* |
1404 | * Special case in which we have a !SCHED_DEADLINE task | 1406 | * Special case in which we have a !SCHED_DEADLINE task |
1405 | * that is going to be deboosted, but exceedes its | 1407 | * that is going to be deboosted, but exceeds its |
1406 | * runtime while doing so. No point in replenishing | 1408 | * runtime while doing so. No point in replenishing |
1407 | * it, as it's going to return back to its original | 1409 | * it, as it's going to return back to its original |
1408 | * scheduling class after this. | 1410 | * scheduling class after this. |