diff options
Diffstat (limited to 'litmus')
-rw-r--r-- | litmus/sched_gsn_edf.c | 22 | ||||
-rw-r--r-- | litmus/sched_litmus.c | 6 |
2 files changed, 19 insertions, 9 deletions
diff --git a/litmus/sched_gsn_edf.c b/litmus/sched_gsn_edf.c index e9c5e531b1ae..44cafbadfa28 100644 --- a/litmus/sched_gsn_edf.c +++ b/litmus/sched_gsn_edf.c | |||
@@ -112,9 +112,9 @@ static rt_domain_t gsnedf; | |||
112 | 112 | ||
113 | 113 | ||
114 | /* Uncomment this if you want to see all scheduling decisions in the | 114 | /* Uncomment this if you want to see all scheduling decisions in the |
115 | * TRACE() log. | 115 | * TRACE() log. */ |
116 | #define WANT_ALL_SCHED_EVENTS | 116 | #define WANT_ALL_SCHED_EVENTS |
117 | */ | 117 | |
118 | 118 | ||
119 | static int cpu_lower_prio(struct bheap_node *_a, struct bheap_node *_b) | 119 | static int cpu_lower_prio(struct bheap_node *_a, struct bheap_node *_b) |
120 | { | 120 | { |
@@ -197,8 +197,9 @@ static noinline void link_task_to_cpu(struct task_struct* linked, | |||
197 | #ifdef WANT_ALL_SCHED_EVENTS | 197 | #ifdef WANT_ALL_SCHED_EVENTS |
198 | if (linked) | 198 | if (linked) |
199 | TRACE_TASK(linked, "linked to %d.\n", entry->cpu); | 199 | TRACE_TASK(linked, "linked to %d.\n", entry->cpu); |
200 | else | 200 | /* else |
201 | TRACE("NULL linked to %d.\n", entry->cpu); | 201 | TRACE("NULL linked to %d.\n", entry->cpu); |
202 | */ | ||
202 | #endif | 203 | #endif |
203 | update_cpu_position(entry); | 204 | update_cpu_position(entry); |
204 | } | 205 | } |
@@ -300,7 +301,7 @@ static noinline void job_completion(struct task_struct *t, int forced) | |||
300 | 301 | ||
301 | sched_trace_task_completion(t, forced); | 302 | sched_trace_task_completion(t, forced); |
302 | 303 | ||
303 | TRACE_TASK(t, "job_completion().\n"); | 304 | TRACE_TASK(t, "job_completion(%u).\n", tsk_rt(t)->job_params.job_no); |
304 | 305 | ||
305 | /* set flags */ | 306 | /* set flags */ |
306 | set_rt_flags(t, RT_F_SLEEP); | 307 | set_rt_flags(t, RT_F_SLEEP); |
@@ -324,6 +325,9 @@ static noinline void job_completion(struct task_struct *t, int forced) | |||
324 | */ | 325 | */ |
325 | static void gsnedf_tick(struct task_struct* t) | 326 | static void gsnedf_tick(struct task_struct* t) |
326 | { | 327 | { |
328 | if (is_realtime(t)) | ||
329 | TRACE_TASK(t, "exec_time = %llu\n", get_exec_time(t)); | ||
330 | |||
327 | if (is_realtime(t) && budget_enforced(t) && budget_exhausted(t)) { | 331 | if (is_realtime(t) && budget_enforced(t) && budget_exhausted(t)) { |
328 | if (!is_np(t)) { | 332 | if (!is_np(t)) { |
329 | /* np tasks will be preempted when they become | 333 | /* np tasks will be preempted when they become |
@@ -395,7 +399,9 @@ static struct task_struct* gsnedf_schedule(struct task_struct * prev) | |||
395 | preempt = entry->scheduled != entry->linked; | 399 | preempt = entry->scheduled != entry->linked; |
396 | 400 | ||
397 | #ifdef WANT_ALL_SCHED_EVENTS | 401 | #ifdef WANT_ALL_SCHED_EVENTS |
398 | TRACE_TASK(prev, "invoked gsnedf_schedule.\n"); | 402 | if (exists || entry->linked) |
403 | TRACE_TASK(prev, "invoked gsnedf_schedule at %llu\n", | ||
404 | litmus_clock()); | ||
399 | #endif | 405 | #endif |
400 | 406 | ||
401 | if (exists) | 407 | if (exists) |
@@ -464,15 +470,12 @@ static struct task_struct* gsnedf_schedule(struct task_struct * prev) | |||
464 | raw_spin_unlock(&gsnedf_lock); | 470 | raw_spin_unlock(&gsnedf_lock); |
465 | 471 | ||
466 | #ifdef WANT_ALL_SCHED_EVENTS | 472 | #ifdef WANT_ALL_SCHED_EVENTS |
467 | TRACE("gsnedf_lock released, next=0x%p\n", next); | ||
468 | |||
469 | if (next) | 473 | if (next) |
470 | TRACE_TASK(next, "scheduled at %llu\n", litmus_clock()); | 474 | TRACE_TASK(next, "scheduled at %llu\n", litmus_clock()); |
471 | else if (exists && !next) | 475 | else if (exists && !next) |
472 | TRACE("becomes idle at %llu.\n", litmus_clock()); | 476 | TRACE("becomes idle at %llu.\n", litmus_clock()); |
473 | #endif | 477 | #endif |
474 | 478 | ||
475 | |||
476 | return next; | 479 | return next; |
477 | } | 480 | } |
478 | 481 | ||
@@ -485,7 +488,8 @@ static void gsnedf_finish_switch(struct task_struct *prev) | |||
485 | 488 | ||
486 | entry->scheduled = is_realtime(current) ? current : NULL; | 489 | entry->scheduled = is_realtime(current) ? current : NULL; |
487 | #ifdef WANT_ALL_SCHED_EVENTS | 490 | #ifdef WANT_ALL_SCHED_EVENTS |
488 | TRACE_TASK(prev, "switched away from\n"); | 491 | if (is_realtime(prev)) |
492 | TRACE_TASK(prev, "switched away from\n"); | ||
489 | #endif | 493 | #endif |
490 | } | 494 | } |
491 | 495 | ||
diff --git a/litmus/sched_litmus.c b/litmus/sched_litmus.c index e6952896dc4b..b61fea15935f 100644 --- a/litmus/sched_litmus.c +++ b/litmus/sched_litmus.c | |||
@@ -10,6 +10,12 @@ static void update_time_litmus(struct rq *rq, struct task_struct *p) | |||
10 | u64 delta = rq->clock - p->se.exec_start; | 10 | u64 delta = rq->clock - p->se.exec_start; |
11 | if (unlikely((s64)delta < 0)) | 11 | if (unlikely((s64)delta < 0)) |
12 | delta = 0; | 12 | delta = 0; |
13 | if (rq->skip_clock_update) | ||
14 | TRACE_TASK(p, "rq->skip_clock_update\n"); | ||
15 | TRACE_TASK(p, "update_time_litmus: " | ||
16 | "rq->clock=%llu " | ||
17 | "p->se.exec_start=%llu litmus=%llu => delta=%llu\n", | ||
18 | rq->clock, p->se.exec_start, litmus_clock(), delta); | ||
13 | /* per job counter */ | 19 | /* per job counter */ |
14 | p->rt_param.job_params.exec_time += delta; | 20 | p->rt_param.job_params.exec_time += delta; |
15 | /* task counter */ | 21 | /* task counter */ |