|
@@ -535,6 +535,26 @@ static enum hrtimer_restart dl_task_timer(struct hrtimer *timer)
|
|
|
|
|
|
sched_clock_tick();
|
|
sched_clock_tick();
|
|
update_rq_clock(rq);
|
|
update_rq_clock(rq);
|
|
|
|
+
|
|
|
|
+ /*
|
|
|
|
+ * If the throttle happened during sched-out; like:
|
|
|
|
+ *
|
|
|
|
+ * schedule()
|
|
|
|
+ * deactivate_task()
|
|
|
|
+ * dequeue_task_dl()
|
|
|
|
+ * update_curr_dl()
|
|
|
|
+ * start_dl_timer()
|
|
|
|
+ * __dequeue_task_dl()
|
|
|
|
+ * prev->on_rq = 0;
|
|
|
|
+ *
|
|
|
|
+ * We can be both throttled and !queued. Replenish the counter
|
|
|
|
+ * but do not enqueue -- wait for our wakeup to do that.
|
|
|
|
+ */
|
|
|
|
+ if (!task_on_rq_queued(p)) {
|
|
|
|
+ replenish_dl_entity(dl_se, dl_se);
|
|
|
|
+ goto unlock;
|
|
|
|
+ }
|
|
|
|
+
|
|
enqueue_task_dl(rq, p, ENQUEUE_REPLENISH);
|
|
enqueue_task_dl(rq, p, ENQUEUE_REPLENISH);
|
|
if (dl_task(rq->curr))
|
|
if (dl_task(rq->curr))
|
|
check_preempt_curr_dl(rq, p, 0);
|
|
check_preempt_curr_dl(rq, p, 0);
|