diff options
author | Glenn Elliott <gelliott@cs.unc.edu> | 2013-04-29 16:43:08 -0400 |
---|---|---|
committer | Glenn Elliott <gelliott@cs.unc.edu> | 2013-04-29 16:43:08 -0400 |
commit | 16a43c267e49c6edce0c155c98a61fbd44a1c101 (patch) | |
tree | d4c3fa4d15ffcb04bc3696a026e710d7341b7e48 /litmus | |
parent | f53579fce61dee2b54a7d7deba097d0023cf7a93 (diff) |
disable proclock, fix bk logging, fix decr prio
Diffstat (limited to 'litmus')
-rw-r--r-- | litmus/fifo_lock.c | 2 | ||||
-rw-r--r-- | litmus/ikglp_lock.c | 2 | ||||
-rw-r--r-- | litmus/prioq_lock.c | 2 | ||||
-rw-r--r-- | litmus/sched_cedf.c | 33 |
4 files changed, 21 insertions, 18 deletions
diff --git a/litmus/fifo_lock.c b/litmus/fifo_lock.c index 745472c30dfd..4598cddbdb79 100644 --- a/litmus/fifo_lock.c +++ b/litmus/fifo_lock.c | |||
@@ -961,7 +961,7 @@ struct litmus_lock* fifo_mutex_new(struct litmus_lock_ops* ops) | |||
961 | 961 | ||
962 | ((struct litmus_lock*)mutex)->nest.hp_waiter_ptr = &mutex->hp_waiter; | 962 | ((struct litmus_lock*)mutex)->nest.hp_waiter_ptr = &mutex->hp_waiter; |
963 | 963 | ||
964 | ((struct litmus_lock*)mutex)->proc = &fifo_proc_ops; | 964 | // ((struct litmus_lock*)mutex)->proc = &fifo_proc_ops; |
965 | 965 | ||
966 | return &mutex->litmus_lock; | 966 | return &mutex->litmus_lock; |
967 | } | 967 | } |
diff --git a/litmus/ikglp_lock.c b/litmus/ikglp_lock.c index fb0080352a9f..c11152c05efb 100644 --- a/litmus/ikglp_lock.c +++ b/litmus/ikglp_lock.c | |||
@@ -2248,7 +2248,7 @@ struct litmus_lock* ikglp_new(unsigned int m, | |||
2248 | } | 2248 | } |
2249 | 2249 | ||
2250 | sem->litmus_lock.ops = ops; | 2250 | sem->litmus_lock.ops = ops; |
2251 | sem->litmus_lock.proc = &ikglp_proc_ops; | 2251 | // sem->litmus_lock.proc = &ikglp_proc_ops; |
2252 | 2252 | ||
2253 | #ifdef CONFIG_DEBUG_SPINLOCK | 2253 | #ifdef CONFIG_DEBUG_SPINLOCK |
2254 | { | 2254 | { |
diff --git a/litmus/prioq_lock.c b/litmus/prioq_lock.c index 4fcb131a52ec..61682d20da51 100644 --- a/litmus/prioq_lock.c +++ b/litmus/prioq_lock.c | |||
@@ -1538,7 +1538,7 @@ struct litmus_lock* prioq_mutex_new(struct litmus_lock_ops* ops) | |||
1538 | 1538 | ||
1539 | ((struct litmus_lock*)mutex)->nest.hp_waiter_ptr = &mutex->hp_waiter; | 1539 | ((struct litmus_lock*)mutex)->nest.hp_waiter_ptr = &mutex->hp_waiter; |
1540 | 1540 | ||
1541 | ((struct litmus_lock*)mutex)->proc = &prioq_proc_ops; | 1541 | // ((struct litmus_lock*)mutex)->proc = &prioq_proc_ops; |
1542 | 1542 | ||
1543 | return &mutex->litmus_lock; | 1543 | return &mutex->litmus_lock; |
1544 | } | 1544 | } |
diff --git a/litmus/sched_cedf.c b/litmus/sched_cedf.c index c4df3778c6a2..a42c06c0ad14 100644 --- a/litmus/sched_cedf.c +++ b/litmus/sched_cedf.c | |||
@@ -599,6 +599,10 @@ static noinline void job_completion(struct task_struct *t, int forced) | |||
599 | } | 599 | } |
600 | else { | 600 | else { |
601 | /* budget was exhausted - force early release */ | 601 | /* budget was exhausted - force early release */ |
602 | if (get_backlog(t) == 0) { | ||
603 | TRACE_TASK(t, "first late job\n"); | ||
604 | ++get_backlog(t); | ||
605 | } | ||
602 | ++get_backlog(t); | 606 | ++get_backlog(t); |
603 | TRACE_TASK(t, "adding backlogged job\n"); | 607 | TRACE_TASK(t, "adding backlogged job\n"); |
604 | } | 608 | } |
@@ -608,19 +612,16 @@ static noinline void job_completion(struct task_struct *t, int forced) | |||
608 | get_backlog(t)); | 612 | get_backlog(t)); |
609 | } | 613 | } |
610 | 614 | ||
611 | |||
612 | |||
613 | /* SETUP FOR THE NEXT JOB */ | 615 | /* SETUP FOR THE NEXT JOB */ |
614 | 616 | ||
615 | sched_trace_task_completion(t, forced); | 617 | sched_trace_task_completion(t, forced); |
616 | 618 | ||
617 | TRACE_TASK(t, "job_completion() at %llu (forced = %d).\n", | 619 | TRACE_TASK(t, "job_completion() at %llu (forced = %d).\n", now, forced); |
618 | now, forced); | ||
619 | 620 | ||
620 | /* set flags */ | 621 | /* set flags */ |
621 | tsk_rt(t)->completed = 0; | 622 | tsk_rt(t)->completed = 0; |
622 | 623 | ||
623 | if (!forced && do_backlogged_job) { | 624 | if (unlikely(!forced && do_backlogged_job)) { |
624 | /* Don't advance deadline/refresh budget. Use the remaining budget for | 625 | /* Don't advance deadline/refresh budget. Use the remaining budget for |
625 | * the backlogged job. | 626 | * the backlogged job. |
626 | * | 627 | * |
@@ -632,16 +633,16 @@ static noinline void job_completion(struct task_struct *t, int forced) | |||
632 | cedf_untrack_in_top_m(t); | 633 | cedf_untrack_in_top_m(t); |
633 | prepare_for_next_period(t); | 634 | prepare_for_next_period(t); |
634 | 635 | ||
636 | do_release = (is_early_releasing(t) || is_released(t, now)); | ||
637 | |||
635 | if (do_backlogged_job) { | 638 | if (do_backlogged_job) { |
636 | TRACE_TASK(t, "refreshing budget with early " | 639 | TRACE_TASK(t, "refreshing budget with early " |
637 | "release for backlogged job.\n"); | 640 | "release for backlogged job.\n"); |
638 | } | 641 | } |
639 | } | 642 | if (do_release || do_backlogged_job) { |
640 | 643 | /* log here to capture overheads */ | |
641 | do_release = (is_early_releasing(t) || is_released(t, now)); | 644 | sched_trace_task_release(t); |
642 | if (do_release) { | 645 | } |
643 | /* log here to capture overheads */ | ||
644 | sched_trace_task_release(t); | ||
645 | } | 646 | } |
646 | 647 | ||
647 | unlink(t); | 648 | unlink(t); |
@@ -2226,11 +2227,13 @@ static int __decrease_priority_inheritance(struct task_struct* t, | |||
2226 | if (is_queued(t)) { | 2227 | if (is_queued(t)) { |
2227 | TRACE_TASK(t, "is queued.\n"); | 2228 | TRACE_TASK(t, "is queued.\n"); |
2228 | 2229 | ||
2230 | BUG_ON( | ||
2231 | !is_released(t, litmus_clock()) && | ||
2232 | !tsk_rt(t)->job_params.is_backlogged_job && | ||
2233 | !is_early_releasing(t)); | ||
2234 | |||
2229 | unlink(t); | 2235 | unlink(t); |
2230 | if (is_released(t, litmus_clock())) | 2236 | cedf_job_arrival(t); |
2231 | cedf_job_arrival(t); | ||
2232 | else | ||
2233 | add_release(&cluster->domain, t); | ||
2234 | } | 2237 | } |
2235 | else { | 2238 | else { |
2236 | TRACE_TASK(t, "is not in scheduler. Probably on wait queue somewhere.\n"); | 2239 | TRACE_TASK(t, "is not in scheduler. Probably on wait queue somewhere.\n"); |