Lines Matching refs:deadline

366  * A flag in the deadline scheduling entity (dl_non_contending)
415 * If this is a non-deadline task that has been boosted,
426 zerolag_time = dl_se->deadline -
476 * If this is a non-deadline task that has been boosted,
532 /* zero means no -deadline tasks */
592 * The list of pushable -deadline task is not a plist, like in
593 * sched_rt.c, it is an rb-tree with tasks ordered by deadline.
605 rq->dl.earliest_dl.next = p->dl.deadline;
624 dl_rq->earliest_dl.next = __node_2_pdl(leftmost)->dl.deadline;
773 dl_se->deadline = rq_clock(rq) + pi_of(dl_se)->dl_deadline;
780 * - the absolute deadline of the entity has to be placed at
781 * current time + relative deadline;
784 * The capability of specifying such event is useful whenever a -deadline
795 WARN_ON(dl_time_before(rq_clock(rq), dl_se->deadline));
798 * We are racing with the deadline timer. So, do nothing because
799 * the deadline timer handler will take care of properly recharging
800 * the runtime and postponing the deadline
825 * of a entity is replenished, its deadline is also postponed. That ensures
849 * We keep moving the deadline away until we get some
855 dl_se->deadline += pi_of(dl_se)->dl_period;
860 * At this point, the deadline really should be "in
865 * resetting the deadline and the budget of the
868 if (dl_time_before(dl_se->deadline, rq_clock(rq))) {
882 * and its current deadline _without_ exceeding the bandwidth it is
885 * over residual deadline fits within the allocated bandwidth, then we
886 * can keep the current (absolute) deadline and residual budget without
888 * refill the runtime and set the deadline a period in the future,
889 * because keeping the current (absolute) deadline of the task would
891 * Documentation/scheduler/sched-deadline.rst for more information).
895 * runtime / (deadline - t) > dl_runtime / dl_deadline ,
899 * Notice that the bandwidth check is done against the deadline. For
900 * task with deadline equal to period this is the same of using
914 * are the relative deadline and the maximum runtime of each
916 * and (deadline - t), since t is rq->clock, is the time left
917 * to the (absolute) deadline. Even if overflowing the u64 type
926 right = ((dl_se->deadline - t) >> DL_SCALE) *
934 * re-initializing task's runtime and deadline, the revised wakeup
939 * runtime / (deadline - t) > dl_runtime / dl_deadline
942 * runtime = (dl_runtime / dl_deadline) * (deadline - t)
953 u64 laxity = dl_se->deadline - rq_clock(rq);
956 * If the task has deadline < period, and the deadline is in the past,
961 WARN_ON(dl_time_before(dl_se->deadline, rq_clock(rq)));
967 * Regarding the deadline, a task with implicit deadline has a relative
968 * deadline == relative period. A task with constrained deadline has a
969 * relative deadline <= relative period.
971 * We support constrained deadline tasks. However, there are some restrictions
972 * applied only for tasks which do not have an implicit deadline. See
975 * The dl_is_implicit() returns true if the task has an implicit deadline.
983 * When a deadline entity is placed in the runqueue, its runtime and deadline
988 * case, the runtime is replenished and a new absolute deadline is set.
991 * remaining runtime and deadline could make the entity to overflow, see
993 * is detected, the runtime and deadline need to be updated.
995 * If the task has an implicit deadline, i.e., deadline == period, the Original
996 * CBS is applied. the runtime is replenished and a new absolute deadline is
1000 * deadline < period, which are said to have a constrained deadline. By
1001 * applying the Original CBS, a constrained deadline task would be able to run
1002 * runtime/deadline in a period. With deadline < period, the task would
1006 * constrained deadline tasks when a runtime overflow is detected. In the
1007 * Revisited CBS, rather than replenishing & setting a new absolute deadline,
1016 if (dl_time_before(dl_se->deadline, rq_clock(rq)) ||
1020 !dl_time_before(dl_se->deadline, rq_clock(rq)) &&
1032 return dl_se->deadline - dl_se->dl_deadline + dl_se->dl_period;
1056 * We want the timer to fire at the deadline, but considering
1067 * chosen as the deadline is too small, don't even try to
1119 * do nothing but clearing dl_throttled, so that runtime and deadline
1250 * runtime and period. If the deadline of the task is in the past, CBS
1252 * works fine for implicit deadline tasks (deadline == period), and the
1253 * CBS was designed for implicit deadline tasks. However, a task with
1254 * constrained deadline (deadline < period) might be awakened after the
1255 * deadline, but before the next period. In this case, replenishing the
1256 * task would allow it to run for runtime / deadline. As in this case
1257 * deadline < period, CBS enables a task to run for more than the
1261 * To avoid this problem, in the activation of a constrained deadline
1262 * task after the deadline but before the next period, throttle the
1270 if (dl_time_before(dl_se->deadline, rq_clock(rq)) &&
1393 * using deadline servers -- however there's a few nasties to figure
1441 * a -deadline task and has not been removed from the dl_rq).
1535 static void inc_dl_deadline(struct dl_rq *dl_rq, u64 deadline)
1540 dl_time_before(deadline, dl_rq->earliest_dl.curr)) {
1543 dl_rq->earliest_dl.curr = deadline;
1544 cpudl_set(&rq->rd->cpudl, rq->cpu, deadline);
1548 static void dec_dl_deadline(struct dl_rq *dl_rq, u64 deadline)
1565 dl_rq->earliest_dl.curr = entry->deadline;
1566 cpudl_set(&rq->rd->cpudl, rq->cpu, entry->deadline);
1572 static inline void inc_dl_deadline(struct dl_rq *dl_rq, u64 deadline) {}
1573 static inline void dec_dl_deadline(struct dl_rq *dl_rq, u64 deadline) {}
1580 u64 deadline = dl_se->deadline;
1585 inc_dl_deadline(dl_rq, deadline);
1595 dec_dl_deadline(dl_rq, dl_se->deadline);
1600 return dl_time_before(__node_2_dle(a)->deadline, __node_2_dle(b)->deadline);
1712 * Check if a constrained deadline task was activated
1713 * after the deadline but before the next period.
1757 dl_time_before(dl_se->deadline, rq_clock(rq_of_dl_se(dl_se)))) {
1858 * Yield task semantic for -deadline tasks is:
1870 * We make the task go to sleep until its current deadline by
1893 dl_time_before(p->dl.deadline,
1915 * If we are dealing with a -deadline task, we must
1917 * If it has a later deadline and the current task
1920 * other hand, if it has a shorter deadline, we
2021 * Only called when both the current and waking task are -deadline
2034 * In the unlikely case current and p have the same deadline
2037 if ((p->dl.deadline == rq->curr->dl.deadline) &&
2324 * Target rq has tasks of equal or earlier deadline,
2347 * If the rq we found has no -deadline task, or
2348 * its earliest one has a later deadline than our
2382 * See if the non running -deadline tasks on this rq
2403 dl_time_before(next_task->dl.deadline, rq->curr->dl.deadline) &&
2463 /* push_dl_task() will return true if it moved a -deadline task */
2518 if (p && dl_time_before(p->dl.deadline, dmin) &&
2525 * deadline than the current task of its runqueue.
2527 if (dl_time_before(p->dl.deadline,
2528 src_rq->curr->dl.deadline))
2537 dmin = p->dl.deadline;
2680 * runtime using its current deadline. If it stays outside of
2714 * Since this might be the only -deadline task on the rq,
2725 * When switching to -deadline, we may overload the rq, then
2761 * If the scheduling parameters of a -deadline task changed,
2773 * we don't have the old deadline value, and
2782 * If we now have a earlier deadline task than p,
2786 if (dl_time_before(rq->dl.earliest_dl.curr, p->dl.deadline))
2790 * Current may not be deadline in case p was throttled but we
2793 * Otherwise, if p was given an earlier deadline, reschedule.
2796 dl_time_before(p->dl.deadline, rq->curr->dl.deadline))
2801 * We don't know if p has a earlier or later deadline, so let's blindly
2958 /* !deadline task may carry old deadline bandwidth */
2963 * Either if a task, enters, leave, or stays -deadline but changes
2992 * Do not decrease the total deadline utilization here,
3008 * absolute deadline will be properly calculated when the task is enqueued
3036 * This function validates the new parameters of a -deadline task.
3037 * We ask for the deadline not being zero, and greater or equal
3039 * greater than deadline. Furthermore, we have to be sure that
3053 /* deadline != 0 */
3076 /* runtime <= deadline <= period (if period != 0) */