aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan <hermanjl@bonham.cs.unc.edu>2011-05-05 03:00:28 -0400
committerJonathan <hermanjl@bonham.cs.unc.edu>2011-05-05 03:00:28 -0400
commit1a05af24647f5655769ce16d48d02e726fc1dbab (patch)
tree3846ee9d7487e3040ba0f238c7e2012a6a33cb69
parent90fb270f1197d673366e4db4981f4b5b0d4ccb1e (diff)
Possible bug fixes
-rw-r--r--litmus/sched_edf_hsb.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/litmus/sched_edf_hsb.c b/litmus/sched_edf_hsb.c
index fba64f6ec02f..fd2070c6f94d 100644
--- a/litmus/sched_edf_hsb.c
+++ b/litmus/sched_edf_hsb.c
@@ -439,9 +439,12 @@ static noinline server_t* next_eligible_slack_server(void)
439 */ 439 */
440static noinline struct task_struct* next_eligible_slack(void) 440static noinline struct task_struct* next_eligible_slack(void)
441{ 441{
442 struct task_struct *next = NULL; 442 struct task_struct *next = get_candidate(slack_candidates.next);
443 443
444 next = get_candidate(slack_candidates.next); 444 while (next && task_srt_server(next)->job_no <= task_job_no(next)) {
445 list_del_init(&task_data(next)->candidate_list);
446 next = get_candidate(slack_candidates.next);
447 }
445 448
446 /* We couldn't find an SRT to schedule. Find a BE which is 449 /* We couldn't find an SRT to schedule. Find a BE which is
447 * either tardy or cannot run due to a lack of servers. 450 * either tardy or cannot run due to a lack of servers.
@@ -724,6 +727,9 @@ static noinline void link_server(cpu_entry_t *entry,
724 BUG_ON(head_in_list(&task_data(entry->linked)->candidate_list)); 727 BUG_ON(head_in_list(&task_data(entry->linked)->candidate_list));
725 BUG_ON(is_be(entry->linked) && is_queued(entry->linked)); 728 BUG_ON(is_be(entry->linked) && is_queued(entry->linked));
726 sched_trace_action(entry->linked, SLACK_RUN_ACTION); 729 sched_trace_action(entry->linked, SLACK_RUN_ACTION);
730 BUG_ON(is_srt(entry->linked) &&
731 task_srt_server(entry->linked)->job_no <=
732 task_job_no(entry->linked));
727 } else { /* BE */ 733 } else { /* BE */
728 /* Should have already been removed from ready heap */ 734 /* Should have already been removed from ready heap */
729 BUG_ON(bheap_node_in_heap(next_server->hn)); 735 BUG_ON(bheap_node_in_heap(next_server->hn));
@@ -1723,14 +1729,8 @@ static void job_completion(cpu_entry_t *entry, struct task_struct* task)
1723 "rel: %llu, dead: %llu", 1729 "rel: %llu, dead: %llu",
1724 TIME(get_release(task)), 1730 TIME(get_release(task)),
1725 TIME(get_deadline(task))); 1731 TIME(get_deadline(task)));
1726 check_slack_candidate(task);
1727 sched_trace_task_completion(task, 1);
1728
1729 return;
1730 } 1732 }
1731 1733
1732 BUG_ON(is_queued(task));
1733
1734 if (server->type == S_SRT) { 1734 if (server->type == S_SRT) {
1735 /* If the task is behind the server it must release immediately, 1735 /* If the task is behind the server it must release immediately,
1736 * leaving its release time and deadline unchanged. 1736 * leaving its release time and deadline unchanged.