diff options
| author | Joshua Bakita <jbakita@cs.unc.edu> | 2020-05-14 23:57:51 -0400 |
|---|---|---|
| committer | Joshua Bakita <jbakita@cs.unc.edu> | 2020-05-14 23:59:47 -0400 |
| commit | 012405dacfaeefaab10ae2e4ceb350166b882f2f (patch) | |
| tree | 31d13e533abe0f762d19e36806d36aead340f559 | |
| parent | 36c4354453f405062cb0478964241f4e1ebead88 (diff) | |
Fix the conditions under which we'll immediately migrate a task to a container
It has to either be finished, not have been released yet, or been
suspended due to running out of budget.
Originally written by Zelin Tong, only cleaned up in this commmit.
| -rw-r--r-- | litmus/sched_edfsc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/litmus/sched_edfsc.c b/litmus/sched_edfsc.c index bd0e49a882a1..b2eb61f3ad33 100644 --- a/litmus/sched_edfsc.c +++ b/litmus/sched_edfsc.c | |||
| @@ -1026,7 +1026,9 @@ static enum hrtimer_restart task_deadline_callback(struct hrtimer* timer) { | |||
| 1026 | // This is true only if set to be migrating from container_boundary | 1026 | // This is true only if set to be migrating from container_boundary |
| 1027 | if (tsk_rt(t)->edfsc_params.move_to) { | 1027 | if (tsk_rt(t)->edfsc_params.move_to) { |
| 1028 | // Migrate here if the task is not late, otherwise migrate in job_complete | 1028 | // Migrate here if the task is not late, otherwise migrate in job_complete |
| 1029 | if (!is_released(t, litmus_clock()) || budget_exhausted(t)) | 1029 | if (!is_released(t, litmus_clock()) |
| 1030 | || (budget_enforced(t) && budget_exhausted(t)) | ||
| 1031 | || is_completed(t)) | ||
| 1030 | migrate_task(t); | 1032 | migrate_task(t); |
| 1031 | } else { | 1033 | } else { |
| 1032 | // A move to NULL means deletion | 1034 | // A move to NULL means deletion |
