diff options
author | Jonathan Herman <hermanjl@cs.unc.edu> | 2011-04-04 04:40:39 -0400 |
---|---|---|
committer | Jonathan Herman <hermanjl@cs.unc.edu> | 2011-04-04 04:40:39 -0400 |
commit | 7b335ec69a6905c80ff3180a6e4dfac937e7d7f5 (patch) | |
tree | d151c79969b6ca08ca62e47d11979746271bb77f /litmus | |
parent | dde19d104a7948f7c7d8c463ffa00564040e54a6 (diff) |
ignore
Diffstat (limited to 'litmus')
-rw-r--r-- | litmus/sched_edf_hsb.c | 34 | ||||
-rw-r--r-- | litmus/servers.c | 3 |
2 files changed, 22 insertions, 15 deletions
diff --git a/litmus/sched_edf_hsb.c b/litmus/sched_edf_hsb.c index 0dbfa26bcc44..d75f8a04b362 100644 --- a/litmus/sched_edf_hsb.c +++ b/litmus/sched_edf_hsb.c | |||
@@ -63,22 +63,21 @@ | |||
63 | * Useful debugging macros. Remove for actual use as they cause | 63 | * Useful debugging macros. Remove for actual use as they cause |
64 | * a lot of lock contention. | 64 | * a lot of lock contention. |
65 | */ | 65 | */ |
66 | #ifdef DEBUG_EDF_HSB | 66 | //#ifdef DEBUG_EDF_HSB |
67 | atomic_t servers_running = ATOMIC_INIT(0); | 67 | atomic_t servers_running = ATOMIC_INIT(0); |
68 | #define TRACE_SUB(fmt, args...) \ | 68 | /* #define TRACE_SUB(fmt, args...) \ */ |
69 | sched_trace_log_message("%d P%d [%s@%s:%d]: " fmt "\n", \ | 69 | /* sched_trace_log_message("%d P%d [%s@%s:%d]: " fmt "\n", \ */ |
70 | TRACE_ARGS, ## args) | 70 | /* TRACE_ARGS, ## args) */ |
71 | #define TRACE_TASK_SUB(t, fmt, args...) \ | 71 | /* #define TRACE_TASK_SUB(t, fmt, args...) \ */ |
72 | TRACE_SUB("(%s/%d:%d) " fmt, (t)->comm, (t)->pid, \ | 72 | /* TRACE_SUB("(%s/%d:%d) " fmt, (t)->comm, (t)->pid, \ */ |
73 | (t)->rt_param.job_params.job_no, ##args) | 73 | /* (t)->rt_param.job_params.job_no, ##args) */ |
74 | #define TRACE_SERVER_SUB(s, fmt, args...) \ | 74 | /* #define TRACE_SERVER_SUB(s, fmt, args...) \ */ |
75 | TRACE_SUB(SERVER_FMT " " fmt, SERVER_ARGS(s), ##args) | 75 | /* TRACE_SUB(SERVER_FMT " " fmt, SERVER_ARGS(s), ##args) */ |
76 | #else | 76 | /* #else */ |
77 | #define TRACE_SUB(fmt, args...) | 77 | #define TRACE_SUB(fmt, args...) |
78 | #define TRACE_TASK_SUB(t, fmt, args...) | 78 | #define TRACE_TASK_SUB(t, fmt, args...) |
79 | #define TRACE_SERVER_SUB(s, fmt, args...) | 79 | #define TRACE_SERVER_SUB(s, fmt, args...) |
80 | #endif | 80 | //#endif |
81 | |||
82 | typedef enum { | 81 | typedef enum { |
83 | S_HRT, | 82 | S_HRT, |
84 | S_SRT, | 83 | S_SRT, |
@@ -482,7 +481,7 @@ static void slack_timer_arm(hrt_server_t *hrt_server) | |||
482 | return; | 481 | return; |
483 | } | 482 | } |
484 | 483 | ||
485 | if (when_to_fire >= hrt_server.server.deadline) { | 484 | if (when_to_fire >= hrt_server->server.deadline) { |
486 | TRACE_SUB("SHOULD BUG, deadline: %llu, budget: %llu", | 485 | TRACE_SUB("SHOULD BUG, deadline: %llu, budget: %llu", |
487 | hrt_server->server.deadline, hrt_server->server.budget); | 486 | hrt_server->server.deadline, hrt_server->server.budget); |
488 | return; | 487 | return; |
@@ -759,6 +758,9 @@ static inline rt_domain_t* get_rt_domain(cpu_entry_t *entry, | |||
759 | static noinline void unlink(struct task_struct* t) | 758 | static noinline void unlink(struct task_struct* t) |
760 | { | 759 | { |
761 | cpu_entry_t *entry; | 760 | cpu_entry_t *entry; |
761 | rt_domain_t *domain; | ||
762 | |||
763 | BUG_ON(!t); | ||
762 | 764 | ||
763 | if (t->rt_param.linked_on != NO_CPU) { | 765 | if (t->rt_param.linked_on != NO_CPU) { |
764 | /* Unlink */ | 766 | /* Unlink */ |
@@ -773,7 +775,11 @@ static noinline void unlink(struct task_struct* t) | |||
773 | * descheduled. | 775 | * descheduled. |
774 | */ | 776 | */ |
775 | entry = task_sched_entry(t); | 777 | entry = task_sched_entry(t); |
776 | remove(get_rt_domain(entry, t), t); | 778 | domain = get_rt_domain(entry, t); |
779 | BUG_ON(!domain); | ||
780 | BUG_ON(!tsk_rt(t)); | ||
781 | BUG_ON(!tsk_rt(t)->heap_node); | ||
782 | remove(domain, t); | ||
777 | } | 783 | } |
778 | } | 784 | } |
779 | 785 | ||
diff --git a/litmus/servers.c b/litmus/servers.c index 0b3f4b0eceb3..25d0970abbd0 100644 --- a/litmus/servers.c +++ b/litmus/servers.c | |||
@@ -13,7 +13,7 @@ | |||
13 | #include <litmus/sched_trace.h> | 13 | #include <litmus/sched_trace.h> |
14 | #include <litmus/servers.h> | 14 | #include <litmus/servers.h> |
15 | 15 | ||
16 | #define DEBUG_SERVERS | 16 | //#define DEBUG_SERVERS |
17 | 17 | ||
18 | /* Not working */ | 18 | /* Not working */ |
19 | /* #define COMPLETION_ON_MASTER */ | 19 | /* #define COMPLETION_ON_MASTER */ |
@@ -59,6 +59,7 @@ | |||
59 | #define _TRACE_SUB(fmt, args...) | 59 | #define _TRACE_SUB(fmt, args...) |
60 | #define TRACE_SUB(s, fmt, args...) | 60 | #define TRACE_SUB(s, fmt, args...) |
61 | #define TRACE_TIMER(s, fmt, args...) | 61 | #define TRACE_TIMER(s, fmt, args...) |
62 | #define _TRACE_TIMER(fmt, args...) | ||
62 | #endif | 63 | #endif |
63 | 64 | ||
64 | /* Used to run a server on a remote CPU */ | 65 | /* Used to run a server on a remote CPU */ |