aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Herman <hermanjl@cs.unc.edu>2011-04-23 13:26:55 -0400
committerJonathan Herman <hermanjl@cs.unc.edu>2011-04-23 13:26:55 -0400
commit61a2998397ab7ab42c5d6f410a8a89dec6ffd93b (patch)
tree31e43c8e70e7ce3a18597185e3435ea898477880
parentd7bc8dd1465068da165342cdc0e4e44b53a576a1 (diff)
parent9ad36912200db8b5976ff33e03cfa713c2765d4d (diff)
Merge branch 'wip-edf-hsb' of ssh://cvs.cs.unc.edu/cvs/proj/litmus/repo/litmus2010 into wip-edf-hsb
Conflicts: litmus/sched_edf_hsb.c
-rw-r--r--litmus/sched_edf_hsb.c15
-rw-r--r--litmus/sched_gsn_edf.c4
2 files changed, 11 insertions, 8 deletions
diff --git a/litmus/sched_edf_hsb.c b/litmus/sched_edf_hsb.c
index 6d0e8a74e4ae..e5d5c5faa834 100644
--- a/litmus/sched_edf_hsb.c
+++ b/litmus/sched_edf_hsb.c
@@ -328,7 +328,7 @@ static void donate_slack(server_t *donator)
328/* 328/*
329 * Donate any available slack from a server. 329 * Donate any available slack from a server.
330 */ 330 */
331static void check_donate_slack(server_t *donator, struct task_struct *was_scheduled) 331static noinline void check_donate_slack(server_t *donator, struct task_struct *was_scheduled)
332{ 332{
333 server_t *slack = server_slack(donator); 333 server_t *slack = server_slack(donator);
334 hrt_server_t *hrt_server; 334 hrt_server_t *hrt_server;
@@ -891,7 +891,7 @@ static inline void catchup_server(server_t *server, lt_t time)
891 TRACE_SERVER_SUB(server, "catching up to %llu", time); 891 TRACE_SERVER_SUB(server, "catching up to %llu", time);
892} 892}
893 893
894static int catchup_srt_server(struct task_struct *task) 894static noinline int catchup_srt_server(struct task_struct *task)
895{ 895{
896 int jobs, rv = 0; 896 int jobs, rv = 0;
897 lt_t release; 897 lt_t release;
@@ -940,7 +940,7 @@ static int catchup_srt_server(struct task_struct *task)
940 * Returns the next eligible slack server. This will remove any expired 940 * Returns the next eligible slack server. This will remove any expired
941 * slack servers still present in the list. 941 * slack servers still present in the list.
942 */ 942 */
943static server_t* next_eligible_slack_server(void) 943static noinline server_t* next_eligible_slack_server(void)
944{ 944{
945 server_t *next_slack = NULL; 945 server_t *next_slack = NULL;
946 946
@@ -965,7 +965,7 @@ static server_t* next_eligible_slack_server(void)
965 * Returns the next SRT task that is tardy or will be tardy. If none 965 * Returns the next SRT task that is tardy or will be tardy. If none
966 * are available, will return a tardy BE task if present. 966 * are available, will return a tardy BE task if present.
967 */ 967 */
968static struct task_struct* next_eligible_slack(void) 968static noinline struct task_struct* next_eligible_slack(void)
969{ 969{
970 struct task_struct *next = get_candidate(slack_candidates.next); 970 struct task_struct *next = get_candidate(slack_candidates.next);
971 971
@@ -983,7 +983,7 @@ static struct task_struct* next_eligible_slack(void)
983 * ineligible or there are no eligible jobs, returns NULL. This will re-release 983 * ineligible or there are no eligible jobs, returns NULL. This will re-release
984 * any servers that are behind. 984 * any servers that are behind.
985 */ 985 */
986static struct task_struct* next_eligible_hrt(hrt_server_t *hrt_server) 986static noinline struct task_struct* next_eligible_hrt(hrt_server_t *hrt_server)
987{ 987{
988 lt_t now = litmus_clock(); 988 lt_t now = litmus_clock();
989 lt_t dead, slack, budget; 989 lt_t dead, slack, budget;
@@ -1066,7 +1066,7 @@ static struct task_struct* next_eligible_hrt(hrt_server_t *hrt_server)
1066/* 1066/*
1067 * This will catch up the SRT's server if it is behind. 1067 * This will catch up the SRT's server if it is behind.
1068 */ 1068 */
1069static struct task_struct* next_eligible_srt(void) 1069static noinline struct task_struct* next_eligible_srt(void)
1070{ 1070{
1071 int done = 0; 1071 int done = 0;
1072 struct task_struct *next_srt; 1072 struct task_struct *next_srt;
@@ -1122,9 +1122,9 @@ static noinline server_t* next_eligible_be_server(void)
1122 bheap_delete(server_order, &be_ready_servers, 1122 bheap_delete(server_order, &be_ready_servers,
1123 be_server->hn); 1123 be_server->hn);
1124 catchup_server(be_server, now); 1124 catchup_server(be_server, now);
1125 check_donate_slack(be_server, NULL);
1125 bheap_insert(server_order, &be_ready_servers, 1126 bheap_insert(server_order, &be_ready_servers,
1126 be_server->hn); 1127 be_server->hn);
1127 check_donate_slack(be_server, NULL);
1128 be_server = next_be_server(); 1128 be_server = next_be_server();
1129 TRACE_SERVER_SUB(be_server, "catching up BE server"); 1129 TRACE_SERVER_SUB(be_server, "catching up BE server");
1130 sched_trace_action(NULL, SERVER_RELEASED_ACTION); /* Release */ 1130 sched_trace_action(NULL, SERVER_RELEASED_ACTION); /* Release */
@@ -1813,6 +1813,7 @@ static void servers_released(struct list_head *servers)
1813 list_del_init(pos); 1813 list_del_init(pos);
1814 1814
1815 if (server->type == S_BE) { 1815 if (server->type == S_BE) {
1816 check_donate_slack(server, NULL);
1816 was_be = 1; 1817 was_be = 1;
1817 BUG_ON(bheap_node_in_heap(server->hn)); 1818 BUG_ON(bheap_node_in_heap(server->hn));
1818 TRACE_SERVER_SUB(server, "inserting BE server"); 1819 TRACE_SERVER_SUB(server, "inserting BE server");
diff --git a/litmus/sched_gsn_edf.c b/litmus/sched_gsn_edf.c
index c5c9600c33d8..2a649beed791 100644
--- a/litmus/sched_gsn_edf.c
+++ b/litmus/sched_gsn_edf.c
@@ -374,8 +374,10 @@ static struct task_struct* gsnedf_schedule(struct task_struct * prev)
374 /* Bail out early if we are the release master. 374 /* Bail out early if we are the release master.
375 * The release master never schedules any real-time tasks. 375 * The release master never schedules any real-time tasks.
376 */ 376 */
377 if (gsnedf.release_master == entry->cpu) 377 if (gsnedf.release_master == entry->cpu) {
378 sched_state_task_picked();
378 return NULL; 379 return NULL;
380 }
379#endif 381#endif
380 382
381 raw_spin_lock(&gsnedf_lock); 383 raw_spin_lock(&gsnedf_lock);