diff options
author | Joshua Bakita <jbakita@cs.unc.edu> | 2020-03-07 17:09:03 -0500 |
---|---|---|
committer | Joshua Bakita <jbakita@cs.unc.edu> | 2020-03-07 17:09:03 -0500 |
commit | 81afc562527873bad51d12256cb8880dec0b7f1d (patch) | |
tree | 164b276db1f2fee293dc68947f9aa13d69b2c7d5 | |
parent | 1624739afa2d2e74b77e91b4a9524b69d05d04c0 (diff) |
Make sure to re-run cschedule if we decide to continue running a container
This fixes the issue where deadlines and releases were not being updated.
As of this commit, multiple real-time tasks can be created, run
simultaneously, be killed, and more tasks can be started and killed
on a multicore system - all without crashing or freezing.
-rw-r--r-- | litmus/sched_edfsc.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/litmus/sched_edfsc.c b/litmus/sched_edfsc.c index 17a7d1f5bca0..9dd30eb60599 100644 --- a/litmus/sched_edfsc.c +++ b/litmus/sched_edfsc.c | |||
@@ -822,8 +822,12 @@ static struct task_struct *edfsc_gschedule(struct task_struct *prev) | |||
822 | entry->scheduled->rt_param.scheduled_on = NO_CPU; | 822 | entry->scheduled->rt_param.scheduled_on = NO_CPU; |
823 | TRACE_TASK(entry->scheduled, "scheduled_on = NO_CPU\n"); | 823 | TRACE_TASK(entry->scheduled, "scheduled_on = NO_CPU\n"); |
824 | } | 824 | } |
825 | } else { | 825 | } else if (entry->scheduled) { |
826 | if (exists) | 826 | // If we've been running a container, make sure that it has nothing new to schedule |
827 | if (is_container(entry->scheduled)) | ||
828 | next = entry->scheduled; | ||
829 | // Otherwise we can keep running any tasks we previously scheduled | ||
830 | else if (is_realtime(prev)) | ||
827 | next = prev; | 831 | next = prev; |
828 | } | 832 | } |
829 | 833 | ||