aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/vdso/Makefile4
-rw-r--r--include/litmus/litmus.h2
-rw-r--r--include/litmus/rt_param.h1
-rw-r--r--include/litmus/sched_plugin.h5
-rw-r--r--include/litmus/sched_trace.h36
-rw-r--r--include/trace/events/litmus.h163
-rw-r--r--litmus/budget.c5
-rw-r--r--litmus/sched_mc.c69
-rw-r--r--litmus/sched_mc_ce.c2
-rw-r--r--litmus/sched_plugin.c6
-rw-r--r--litmus/sched_psn_edf.c3
-rw-r--r--litmus/sync.c3
12 files changed, 277 insertions, 22 deletions
diff --git a/arch/x86/vdso/Makefile b/arch/x86/vdso/Makefile
index 4a2afa1bac51..b6552b189bcd 100644
--- a/arch/x86/vdso/Makefile
+++ b/arch/x86/vdso/Makefile
@@ -25,7 +25,7 @@ targets += vdso.so vdso.so.dbg vdso.lds $(vobjs-y)
25 25
26export CPPFLAGS_vdso.lds += -P -C 26export CPPFLAGS_vdso.lds += -P -C
27 27
28VDSO_LDFLAGS_vdso.lds = -m elf_x86_64 -Wl,-soname=linux-vdso.so.1 \ 28VDSO_LDFLAGS_vdso.lds = -m64 -Wl,-soname=linux-vdso.so.1 \
29 -Wl,-z,max-page-size=4096 -Wl,-z,common-page-size=4096 29 -Wl,-z,max-page-size=4096 -Wl,-z,common-page-size=4096
30 30
31$(obj)/vdso.o: $(src)/vdso.S $(obj)/vdso.so 31$(obj)/vdso.o: $(src)/vdso.S $(obj)/vdso.so
@@ -69,7 +69,7 @@ vdso32.so-$(VDSO32-y) += sysenter
69vdso32-images = $(vdso32.so-y:%=vdso32-%.so) 69vdso32-images = $(vdso32.so-y:%=vdso32-%.so)
70 70
71CPPFLAGS_vdso32.lds = $(CPPFLAGS_vdso.lds) 71CPPFLAGS_vdso32.lds = $(CPPFLAGS_vdso.lds)
72VDSO_LDFLAGS_vdso32.lds = -m elf_i386 -Wl,-soname=linux-gate.so.1 72VDSO_LDFLAGS_vdso32.lds = -m32 -Wl,-soname=linux-gate.so.1
73 73
74# This makes sure the $(obj) subdirectory exists even though vdso32/ 74# This makes sure the $(obj) subdirectory exists even though vdso32/
75# is not a kbuild sub-make subdirectory. 75# is not a kbuild sub-make subdirectory.
diff --git a/include/litmus/litmus.h b/include/litmus/litmus.h
index 4322d59c0e8f..d5dbc82f0dfc 100644
--- a/include/litmus/litmus.h
+++ b/include/litmus/litmus.h
@@ -44,6 +44,8 @@ void litmus_exit_task(struct task_struct *tsk);
44 44
45#define tsk_rt(t) (&(t)->rt_param) 45#define tsk_rt(t) (&(t)->rt_param)
46 46
47#define get_server_job(t) (tsk_rt(t)->job_params.fake_job_no)
48
47/* Realtime utility macros */ 49/* Realtime utility macros */
48#define get_rt_flags(t) (tsk_rt(t)->flags) 50#define get_rt_flags(t) (tsk_rt(t)->flags)
49#define set_rt_flags(t,f) (tsk_rt(t)->flags=(f)) 51#define set_rt_flags(t,f) (tsk_rt(t)->flags=(f))
diff --git a/include/litmus/rt_param.h b/include/litmus/rt_param.h
index 55419d411614..4293575d3472 100644
--- a/include/litmus/rt_param.h
+++ b/include/litmus/rt_param.h
@@ -85,6 +85,7 @@ struct rt_job {
85 85
86 lt_t real_release; 86 lt_t real_release;
87 lt_t real_deadline; 87 lt_t real_deadline;
88 unsigned int fake_job_no;
88 89
89 /* How much service has this job received so far? */ 90 /* How much service has this job received so far? */
90 lt_t exec_time; 91 lt_t exec_time;
diff --git a/include/litmus/sched_plugin.h b/include/litmus/sched_plugin.h
index 32c23974e45a..0f529fa78b4d 100644
--- a/include/litmus/sched_plugin.h
+++ b/include/litmus/sched_plugin.h
@@ -69,6 +69,9 @@ typedef long (*admit_task_t)(struct task_struct* tsk);
69 69
70typedef void (*release_at_t)(struct task_struct *t, lt_t start); 70typedef void (*release_at_t)(struct task_struct *t, lt_t start);
71 71
72/* TODO remove me */
73typedef void (*release_ts_t)(lt_t time);
74
72struct sched_plugin { 75struct sched_plugin {
73 struct list_head list; 76 struct list_head list;
74 /* basic info */ 77 /* basic info */
@@ -95,6 +98,8 @@ struct sched_plugin {
95 task_block_t task_block; 98 task_block_t task_block;
96 task_exit_t task_exit; 99 task_exit_t task_exit;
97 100
101 release_ts_t release_ts;
102
98#ifdef CONFIG_LITMUS_LOCKING 103#ifdef CONFIG_LITMUS_LOCKING
99 /* locking protocols */ 104 /* locking protocols */
100 allocate_lock_t allocate_lock; 105 allocate_lock_t allocate_lock;
diff --git a/include/litmus/sched_trace.h b/include/litmus/sched_trace.h
index 6868a07dac46..368bd3dc3be8 100644
--- a/include/litmus/sched_trace.h
+++ b/include/litmus/sched_trace.h
@@ -181,6 +181,13 @@ feather_callback void do_sched_trace_sys_release(unsigned long id,
181#define trace_litmus_task_resume(t) 181#define trace_litmus_task_resume(t)
182#define trace_litmus_sys_release(start) 182#define trace_litmus_sys_release(start)
183 183
184#define trace_litmus_container_param(cid, name)
185#define trace_litmus_server_param(sid, cid, wcet, time)
186#define trace_litmus_server_switch_to(sid, job, tid)
187#define trace_litmus_server_switch_away(sid, job, tid)
188#define trace_litmus_server_release(sid, job, release, deadline)
189#define trace_litmus_server_completion(sid, job)
190
184#endif 191#endif
185 192
186 193
@@ -258,6 +265,35 @@ feather_callback void do_sched_trace_sys_release(unsigned long id,
258 sched_trace_log_message("%d P%d [%s@%s:%d]: Took %llu\n\n", \ 265 sched_trace_log_message("%d P%d [%s@%s:%d]: Took %llu\n\n", \
259 TRACE_ARGS, litmus_clock() - _qt_start) 266 TRACE_ARGS, litmus_clock() - _qt_start)
260 267
268#define sched_trace_container_param(cid, name) \
269 do { \
270 trace_litmus_container_param(cid, name); \
271 } while (0)
272
273#define sched_trace_server_param(sid, cid, wcet, period) \
274 do { \
275 trace_litmus_server_param(sid, cid, wcet, period); \
276 } while(0)
277
278#define sched_trace_server_switch_to(sid, job, tid) \
279 do { \
280 trace_litmus_server_switch_to(sid, job, tid); \
281 } while(0)
282
283#define sched_trace_server_switch_away(sid, job, tid) \
284 do { \
285 trace_litmus_server_switch_away(sid, job, tid); \
286 } while (0)
287
288#define sched_trace_server_release(sid, job, rel, dead) \
289 do { \
290 trace_litmus_server_release(sid, job, rel, dead); \
291 } while (0)
292
293#define sched_trace_server_completion(sid, job) \
294 do { \
295 trace_litmus_server_completion(sid, job); \
296 } while (0)
261 297
262#define sched_trace_quantum_boundary() /* NOT IMPLEMENTED */ 298#define sched_trace_quantum_boundary() /* NOT IMPLEMENTED */
263 299
diff --git a/include/trace/events/litmus.h b/include/trace/events/litmus.h
index 0fffcee02be0..5ca4bef205f0 100644
--- a/include/trace/events/litmus.h
+++ b/include/trace/events/litmus.h
@@ -11,10 +11,6 @@
11 11
12#include <litmus/litmus.h> 12#include <litmus/litmus.h>
13#include <litmus/rt_param.h> 13#include <litmus/rt_param.h>
14
15/*
16 * Tracing task admission
17 */
18TRACE_EVENT(litmus_task_param, 14TRACE_EVENT(litmus_task_param,
19 15
20 TP_PROTO(struct task_struct *t), 16 TP_PROTO(struct task_struct *t),
@@ -24,9 +20,9 @@ TRACE_EVENT(litmus_task_param,
24 TP_STRUCT__entry( 20 TP_STRUCT__entry(
25 __field( pid_t, pid ) 21 __field( pid_t, pid )
26 __field( unsigned int, job ) 22 __field( unsigned int, job )
27 __field( lt_t, wcet ) 23 __field( unsigned long long, wcet )
28 __field( lt_t, period ) 24 __field( unsigned long long, period )
29 __field( lt_t, phase ) 25 __field( unsigned long long, phase )
30 __field( int, partition ) 26 __field( int, partition )
31 ), 27 ),
32 28
@@ -56,8 +52,8 @@ TRACE_EVENT(litmus_task_release,
56 TP_STRUCT__entry( 52 TP_STRUCT__entry(
57 __field( pid_t, pid ) 53 __field( pid_t, pid )
58 __field( unsigned int, job ) 54 __field( unsigned int, job )
59 __field( lt_t, release ) 55 __field( unsigned long long, release )
60 __field( lt_t, deadline ) 56 __field( unsigned long long, deadline )
61 ), 57 ),
62 58
63 TP_fast_assign( 59 TP_fast_assign(
@@ -84,8 +80,8 @@ TRACE_EVENT(litmus_switch_to,
84 TP_STRUCT__entry( 80 TP_STRUCT__entry(
85 __field( pid_t, pid ) 81 __field( pid_t, pid )
86 __field( unsigned int, job ) 82 __field( unsigned int, job )
87 __field( lt_t, when ) 83 __field( unsigned long long, when )
88 __field( lt_t, exec_time ) 84 __field( unsigned long long, exec_time )
89 ), 85 ),
90 86
91 TP_fast_assign( 87 TP_fast_assign(
@@ -112,8 +108,8 @@ TRACE_EVENT(litmus_switch_away,
112 TP_STRUCT__entry( 108 TP_STRUCT__entry(
113 __field( pid_t, pid ) 109 __field( pid_t, pid )
114 __field( unsigned int, job ) 110 __field( unsigned int, job )
115 __field( lt_t, when ) 111 __field( unsigned long long, when )
116 __field( lt_t, exec_time ) 112 __field( unsigned long long, exec_time )
117 ), 113 ),
118 114
119 TP_fast_assign( 115 TP_fast_assign(
@@ -140,7 +136,7 @@ TRACE_EVENT(litmus_task_completion,
140 TP_STRUCT__entry( 136 TP_STRUCT__entry(
141 __field( pid_t, pid ) 137 __field( pid_t, pid )
142 __field( unsigned int, job ) 138 __field( unsigned int, job )
143 __field( lt_t, when ) 139 __field( unsigned long long, when )
144 __field( unsigned long, forced ) 140 __field( unsigned long, forced )
145 ), 141 ),
146 142
@@ -167,7 +163,7 @@ TRACE_EVENT(litmus_task_block,
167 163
168 TP_STRUCT__entry( 164 TP_STRUCT__entry(
169 __field( pid_t, pid ) 165 __field( pid_t, pid )
170 __field( lt_t, when ) 166 __field( unsigned long long, when )
171 ), 167 ),
172 168
173 TP_fast_assign( 169 TP_fast_assign(
@@ -190,7 +186,7 @@ TRACE_EVENT(litmus_task_resume,
190 TP_STRUCT__entry( 186 TP_STRUCT__entry(
191 __field( pid_t, pid ) 187 __field( pid_t, pid )
192 __field( unsigned int, job ) 188 __field( unsigned int, job )
193 __field( lt_t, when ) 189 __field( unsigned long long, when )
194 ), 190 ),
195 191
196 TP_fast_assign( 192 TP_fast_assign(
@@ -208,13 +204,13 @@ TRACE_EVENT(litmus_task_resume,
208 */ 204 */
209TRACE_EVENT(litmus_sys_release, 205TRACE_EVENT(litmus_sys_release,
210 206
211 TP_PROTO(lt_t *start), 207 TP_PROTO(unsigned long long *start),
212 208
213 TP_ARGS(start), 209 TP_ARGS(start),
214 210
215 TP_STRUCT__entry( 211 TP_STRUCT__entry(
216 __field( lt_t, rel ) 212 __field( unsigned long long, rel )
217 __field( lt_t, when ) 213 __field( unsigned long long, when )
218 ), 214 ),
219 215
220 TP_fast_assign( 216 TP_fast_assign(
@@ -225,6 +221,135 @@ TRACE_EVENT(litmus_sys_release,
225 TP_printk("SynRelease(%Lu) at %Lu\n", __entry->rel, __entry->when) 221 TP_printk("SynRelease(%Lu) at %Lu\n", __entry->rel, __entry->when)
226); 222);
227 223
224/*
225 * Containers
226 */
227TRACE_EVENT(litmus_container_param,
228
229 TP_PROTO(int cid, const char *name),
230
231 TP_ARGS(cid, name),
232
233 TP_STRUCT__entry(
234 __field( int, cid )
235 __array( char, name, TASK_COMM_LEN )
236 ),
237
238 TP_fast_assign(
239 memcpy(__entry->name, name, TASK_COMM_LEN);
240 __entry->cid = cid;
241 ),
242
243 TP_printk("container, name: %s, id: %d\n", __entry->name, __entry->cid)
244);
245
246TRACE_EVENT(litmus_server_param,
247
248 TP_PROTO(int sid, int cid, unsigned long long wcet, unsigned long long period),
249
250 TP_ARGS(sid, cid, wcet, period),
251
252 TP_STRUCT__entry(
253 __field( int, sid )
254 __field( int, cid )
255 __field( unsigned long long, wcet )
256 __field( unsigned long long, period )
257 ),
258
259 TP_fast_assign(
260 __entry->cid = cid;
261 __entry->sid = sid;
262 __entry->wcet = wcet;
263 __entry->period = period;
264 ),
265
266 TP_printk("server(%llu, %llu), sid: %llu, cont: %llu\n",
267 __entry->wcet, __entry->period, __entry->sid, __entry->cid)
268);
269
270TRACE_EVENT(litmus_server_switch_to,
271
272 TP_PROTO(int sid, unsigned int job, int tid),
273
274 TP_ARGS(sid, job, tid),
275
276 TP_STRUCT__entry(
277 __field( int, sid)
278 __field( unsigned int, job)
279 __field( int, tid)
280 ),
281
282 TP_fast_assign(
283 __entry->sid = sid;
284 __entry->tid = tid;
285 __entry->job = job;
286 ),
287
288 TP_printk("switch_to(server(%d, %u)): %d\n", __entry->sid, __entry->job, __entry->tid)
289);
290
291TRACE_EVENT(litmus_server_switch_away,
292
293 TP_PROTO(int sid, unsigned int job, int tid),
294
295 TP_ARGS(sid, job, tid),
296
297 TP_STRUCT__entry(
298 __field( int, sid)
299 __field( unsigned int, job)
300 __field( int, tid)
301 ),
302
303 TP_fast_assign(
304 __entry->sid = sid;
305 __entry->tid = tid;
306 ),
307
308 TP_printk("switch_away(server(%d, %u)): %d\n", __entry->sid, __entry->job, __entry->tid)
309);
310
311TRACE_EVENT(litmus_server_release,
312
313 TP_PROTO(int sid, unsigned int job, unsigned long long release, unsigned long long deadline),
314
315 TP_ARGS(sid, job, release, deadline),
316
317 TP_STRUCT__entry(
318 __field( int, sid)
319 __field( unsigned int, job)
320 __field( unsigned long long, release)
321 __field( unsigned long long, deadline)
322 ),
323
324 TP_fast_assign(
325 __entry->sid = sid;
326 __entry->job = job;
327 __entry->release = release;
328 __entry->deadline = deadline;
329 ),
330
331 TP_printk("release(server(%d, %u)), release: %llu, deadline: %llu\n", __entry->sid, __entry->job, __entry->release, __entry->deadline)
332);
333
334TRACE_EVENT(litmus_server_completion,
335
336 TP_PROTO(int sid, int job),
337
338 TP_ARGS(sid, job),
339
340 TP_STRUCT__entry(
341 __field( int, sid)
342 __field( unsigned int, job)
343 ),
344
345 TP_fast_assign(
346 __entry->sid = sid;
347 __entry->job = job;
348 ),
349
350 TP_printk("completion(server(%d, %d))\n", __entry->sid, __entry->job)
351);
352
228#endif /* _SCHED_TASK_TRACEPOINT_H */ 353#endif /* _SCHED_TASK_TRACEPOINT_H */
229 354
230/* Must stay outside the protection */ 355/* Must stay outside the protection */
diff --git a/litmus/budget.c b/litmus/budget.c
index 93945e0911a7..172c12b369da 100644
--- a/litmus/budget.c
+++ b/litmus/budget.c
@@ -124,8 +124,13 @@ void server_release(struct task_struct *t)
124 t->rt_param.job_params.exec_time = 0; 124 t->rt_param.job_params.exec_time = 0;
125 t->rt_param.job_params.release = t->rt_param.job_params.deadline; 125 t->rt_param.job_params.release = t->rt_param.job_params.deadline;
126 t->rt_param.job_params.deadline += get_rt_period(t); 126 t->rt_param.job_params.deadline += get_rt_period(t);
127 t->rt_param.job_params.fake_job_no++;
127 /* don't confuse linux */ 128 /* don't confuse linux */
128 t->rt.time_slice = 1; 129 t->rt.time_slice = 1;
130
131 sched_trace_server_release(-t->pid, get_server_job(t),
132 t->rt_param.job_params.release,
133 t->rt_param.job_params.deadline);
129} 134}
130 135
131module_init(init_budget_enforcement); 136module_init(init_budget_enforcement);
diff --git a/litmus/sched_mc.c b/litmus/sched_mc.c
index 53b475e840f0..eb8ae7fab95a 100644
--- a/litmus/sched_mc.c
+++ b/litmus/sched_mc.c
@@ -124,6 +124,11 @@ static int interrupt_cpu;
124 STRACE("%s P%d, linked=" TS " " fmt, \ 124 STRACE("%s P%d, linked=" TS " " fmt, \
125 (ce)->domain->name, crit_cpu(ce)->cpu, TA((ce)->linked), ##args) 125 (ce)->domain->name, crit_cpu(ce)->cpu, TA((ce)->linked), ##args)
126 126
127static int sid(struct crit_entry *ce)
128{
129 return ce->level * num_online_cpus() + crit_cpu(ce)->cpu;
130}
131
127/* 132/*
128 * Sort CPUs within a global domain's heap. 133 * Sort CPUs within a global domain's heap.
129 */ 134 */
@@ -302,6 +307,7 @@ static void link_task_to_crit(struct crit_entry *ce,
302 update_ghost_time(ce->linked); 307 update_ghost_time(ce->linked);
303 } 308 }
304 } 309 }
310 sched_trace_server_switch_away(sid(ce), 0, ce->linked->pid);
305 } 311 }
306 312
307 /* Actually link task */ 313 /* Actually link task */
@@ -317,6 +323,10 @@ static void link_task_to_crit(struct crit_entry *ce,
317 when_to_fire = task->se.exec_start + 323 when_to_fire = task->se.exec_start +
318 tsk_mc_data(task)->mc_job.ghost_budget; 324 tsk_mc_data(task)->mc_job.ghost_budget;
319 arm_ghost(ce, when_to_fire); 325 arm_ghost(ce, when_to_fire);
326
327 sched_trace_server_switch_to(sid(ce), 0, 0);
328 } else {
329 sched_trace_server_switch_to(sid(ce), 0, task->pid);
320 } 330 }
321 } 331 }
322} 332}
@@ -420,8 +430,17 @@ static void link_task_to_cpu(struct cpu_entry *entry, struct task_struct *task)
420 BUG_ON(task && tsk_rt(task)->linked_on != entry->cpu); 430 BUG_ON(task && tsk_rt(task)->linked_on != entry->cpu);
421 BUG_ON(task && is_ghost(task)); 431 BUG_ON(task && is_ghost(task));
422 432
433 if (entry->linked) {
434 sched_trace_server_switch_away(-entry->linked->pid,
435 get_server_job(entry->linked),
436 entry->linked->pid);
437 }
438
423 if (task){ 439 if (task){
424 set_rt_flags(task, RT_F_RUNNING); 440 set_rt_flags(task, RT_F_RUNNING);
441 sched_trace_server_switch_to(-task->pid,
442 get_server_job(task),
443 task->pid);
425 } 444 }
426 entry->linked = task; 445 entry->linked = task;
427 446
@@ -655,6 +674,8 @@ static void job_completion(struct task_struct *task, int forced)
655 674
656 /* If server has run out of budget, wait until next release */ 675 /* If server has run out of budget, wait until next release */
657 if (budget_exhausted(task)) { 676 if (budget_exhausted(task)) {
677 sched_trace_server_completion(-task->pid,
678 get_server_job(task));
658 server_release(task); 679 server_release(task);
659 } 680 }
660 681
@@ -812,6 +833,8 @@ static void mc_task_new(struct task_struct *t, int on_rq, int running)
812 unsigned long flags; 833 unsigned long flags;
813 struct cpu_entry* entry; 834 struct cpu_entry* entry;
814 enum crit_level level = tsk_mc_crit(t); 835 enum crit_level level = tsk_mc_crit(t);
836 char name[TASK_COMM_LEN];
837 strcpy(name, "rtspin");
815 838
816 local_irq_save(flags); 839 local_irq_save(flags);
817 TRACE("New mixed criticality task %d\n", t->pid); 840 TRACE("New mixed criticality task %d\n", t->pid);
@@ -823,6 +846,10 @@ static void mc_task_new(struct task_struct *t, int on_rq, int running)
823 entry = &per_cpu(cpus, task_cpu(t)); 846 entry = &per_cpu(cpus, task_cpu(t));
824 t->rt_param._domain = entry->crit_entries[level].domain; 847 t->rt_param._domain = entry->crit_entries[level].domain;
825 848
849 sched_trace_container_param(t->pid, name);
850 sched_trace_server_param(-t->pid, t->pid,
851 get_exec_cost(t), get_rt_period(t));
852
826 /* Setup job params */ 853 /* Setup job params */
827 release_at(t, litmus_clock()); 854 release_at(t, litmus_clock());
828 tsk_mc_data(t)->mc_job.ghost_budget = 0; 855 tsk_mc_data(t)->mc_job.ghost_budget = 0;
@@ -836,6 +863,7 @@ static void mc_task_new(struct task_struct *t, int on_rq, int running)
836 } 863 }
837 t->rt_param.linked_on = NO_CPU; 864 t->rt_param.linked_on = NO_CPU;
838 865
866
839 job_arrival(t); 867 job_arrival(t);
840 868
841 local_irq_restore(flags); 869 local_irq_restore(flags);
@@ -1141,6 +1169,46 @@ out:
1141 return ret; 1169 return ret;
1142} 1170}
1143 1171
1172
1173static void mc_release_ts(lt_t time)
1174{
1175 int i, cpu, base_id = 0, cont_id = -1;
1176 char name[TASK_COMM_LEN];
1177 enum crit_level level;
1178 struct cpu_entry *entry;
1179 struct crit_entry *ce;
1180
1181 level = CRIT_LEVEL_A;
1182 strcpy(name, "LVL-A");
1183 for_each_online_cpu(cpu) {
1184 entry = &per_cpu(cpus, cpu);
1185 trace_litmus_container_param(++cont_id, &name);
1186 ce = &entry->crit_entries[level];
1187 sched_trace_server_param(sid(ce), cont_id, 0, 0);
1188 }
1189
1190 level = CRIT_LEVEL_B;
1191 strcpy(name, "LVL-B");
1192 for_each_online_cpu(cpu) {
1193 entry = &per_cpu(cpus, cpu);
1194 trace_litmus_container_param(++cont_id, &name);
1195 ce = &entry->crit_entries[level];
1196 sched_trace_server_param(sid(ce), cont_id, 0, 0);
1197 }
1198
1199 level = CRIT_LEVEL_C;
1200 strcpy(name, "LVL-C");
1201 trace_litmus_container_param(++cont_id, &name);
1202 for_each_online_cpu(cpu) {
1203 entry = &per_cpu(cpus, cpu);
1204 ce = &entry->crit_entries[level];
1205 sched_trace_server_param(sid(ce), cont_id, 0, 0);
1206 }
1207
1208
1209
1210}
1211
1144static struct sched_plugin mc_plugin __cacheline_aligned_in_smp = { 1212static struct sched_plugin mc_plugin __cacheline_aligned_in_smp = {
1145 .plugin_name = "MC", 1213 .plugin_name = "MC",
1146 .task_new = mc_task_new, 1214 .task_new = mc_task_new,
@@ -1154,6 +1222,7 @@ static struct sched_plugin mc_plugin __cacheline_aligned_in_smp = {
1154 .release_at = mc_release_at, 1222 .release_at = mc_release_at,
1155 .deactivate_plugin = mc_deactivate_plugin, 1223 .deactivate_plugin = mc_deactivate_plugin,
1156 .finish_switch = mc_finish_switch, 1224 .finish_switch = mc_finish_switch,
1225 .release_ts = mc_release_ts,
1157}; 1226};
1158 1227
1159static void init_crit_entry(struct crit_entry *ce, enum crit_level level, 1228static void init_crit_entry(struct crit_entry *ce, enum crit_level level,
diff --git a/litmus/sched_mc_ce.c b/litmus/sched_mc_ce.c
index af02dfdbb523..4808377b9bb7 100644
--- a/litmus/sched_mc_ce.c
+++ b/litmus/sched_mc_ce.c
@@ -292,7 +292,7 @@ long mc_ce_admit_task_common(struct task_struct *ts)
292 printk(KERN_INFO "litmus: couldn't get pid struct for %d\n", 292 printk(KERN_INFO "litmus: couldn't get pid struct for %d\n",
293 ts->pid); 293 ts->pid);
294 goto out; 294 goto out;
295 } 295n }
296 296
297 if (lvl_a_id >= pid_table->num_pid_entries) { 297 if (lvl_a_id >= pid_table->num_pid_entries) {
298 printk(KERN_INFO "litmus: level A id greater than expected " 298 printk(KERN_INFO "litmus: level A id greater than expected "
diff --git a/litmus/sched_plugin.c b/litmus/sched_plugin.c
index d54886df1f57..4eaf30659af3 100644
--- a/litmus/sched_plugin.c
+++ b/litmus/sched_plugin.c
@@ -106,6 +106,10 @@ static void litmus_dummy_task_exit(struct task_struct *task)
106{ 106{
107} 107}
108 108
109static void litmus_dummy_release_ts(lt_t time)
110{
111}
112
109static long litmus_dummy_complete_job(void) 113static long litmus_dummy_complete_job(void)
110{ 114{
111 return -ENOSYS; 115 return -ENOSYS;
@@ -147,6 +151,7 @@ struct sched_plugin linux_sched_plugin = {
147 .finish_switch = litmus_dummy_finish_switch, 151 .finish_switch = litmus_dummy_finish_switch,
148 .activate_plugin = litmus_dummy_activate_plugin, 152 .activate_plugin = litmus_dummy_activate_plugin,
149 .deactivate_plugin = litmus_dummy_deactivate_plugin, 153 .deactivate_plugin = litmus_dummy_deactivate_plugin,
154 .release_ts = litmus_dummy_release_ts,
150#ifdef CONFIG_LITMUS_LOCKING 155#ifdef CONFIG_LITMUS_LOCKING
151 .allocate_lock = litmus_dummy_allocate_lock, 156 .allocate_lock = litmus_dummy_allocate_lock,
152#endif 157#endif
@@ -185,6 +190,7 @@ int register_sched_plugin(struct sched_plugin* plugin)
185 CHECK(complete_job); 190 CHECK(complete_job);
186 CHECK(activate_plugin); 191 CHECK(activate_plugin);
187 CHECK(deactivate_plugin); 192 CHECK(deactivate_plugin);
193 CHECK(release_ts);
188#ifdef CONFIG_LITMUS_LOCKING 194#ifdef CONFIG_LITMUS_LOCKING
189 CHECK(allocate_lock); 195 CHECK(allocate_lock);
190#endif 196#endif
diff --git a/litmus/sched_psn_edf.c b/litmus/sched_psn_edf.c
index abb06fa53e3a..04f12464686a 100644
--- a/litmus/sched_psn_edf.c
+++ b/litmus/sched_psn_edf.c
@@ -283,6 +283,9 @@ static void psnedf_task_new(struct task_struct * t, int on_rq, int running)
283 TRACE_TASK(t, "psn edf: task new, cpu = %d\n", 283 TRACE_TASK(t, "psn edf: task new, cpu = %d\n",
284 t->rt_param.task_params.cpu); 284 t->rt_param.task_params.cpu);
285 285
286 trace_litmus_server_param(0 - t->pid, -1 - get_partition(task),
287 get_exec_time(t), get_rt_period(t));
288
286 /* setup job parameters */ 289 /* setup job parameters */
287 release_at(t, litmus_clock()); 290 release_at(t, litmus_clock());
288 291
diff --git a/litmus/sync.c b/litmus/sync.c
index bf75fde5450b..f3c9262f7022 100644
--- a/litmus/sync.c
+++ b/litmus/sync.c
@@ -73,6 +73,9 @@ static long do_release_ts(lt_t start)
73 73
74 complete_n(&ts_release, task_count); 74 complete_n(&ts_release, task_count);
75 75
76 /* TODO: remove this hack */
77 litmus->release_ts(start);
78
76 return task_count; 79 return task_count;
77} 80}
78 81