|
@@ -570,24 +570,7 @@ void init_dl_task_timer(struct sched_dl_entity *dl_se)
|
|
static
|
|
static
|
|
int dl_runtime_exceeded(struct rq *rq, struct sched_dl_entity *dl_se)
|
|
int dl_runtime_exceeded(struct rq *rq, struct sched_dl_entity *dl_se)
|
|
{
|
|
{
|
|
- int dmiss = dl_time_before(dl_se->deadline, rq_clock(rq));
|
|
|
|
- int rorun = dl_se->runtime <= 0;
|
|
|
|
-
|
|
|
|
- if (!rorun && !dmiss)
|
|
|
|
- return 0;
|
|
|
|
-
|
|
|
|
- /*
|
|
|
|
- * If we are beyond our current deadline and we are still
|
|
|
|
- * executing, then we have already used some of the runtime of
|
|
|
|
- * the next instance. Thus, if we do not account that, we are
|
|
|
|
- * stealing bandwidth from the system at each deadline miss!
|
|
|
|
- */
|
|
|
|
- if (dmiss) {
|
|
|
|
- dl_se->runtime = rorun ? dl_se->runtime : 0;
|
|
|
|
- dl_se->runtime -= rq_clock(rq) - dl_se->deadline;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- return 1;
|
|
|
|
|
|
+ return (dl_se->runtime <= 0);
|
|
}
|
|
}
|
|
|
|
|
|
extern bool sched_rt_bandwidth_account(struct rt_rq *rt_rq);
|
|
extern bool sched_rt_bandwidth_account(struct rt_rq *rt_rq);
|