diff options
author | Jonathan Herman <hermanjl@cs.unc.edu> | 2011-10-11 15:33:06 -0400 |
---|---|---|
committer | Jonathan Herman <hermanjl@cs.unc.edu> | 2011-10-11 15:33:06 -0400 |
commit | e6c4555d308a5fadb7da9a7394150008adb5dc7d (patch) | |
tree | 3e70806c0b8aceb6451776eda0775b6a2817d537 /litmus | |
parent | eeaec489f3c4d9385c09aaff735b1444682c85d7 (diff) | |
parent | 657e11dcb9ec8e8ed7ffcbd490d845072bcb4be4 (diff) |
Merge branch 'wip-mc' of ssh://cvs.cs.unc.edu/cvs/proj/litmus/repo/litmus2010 into wip-mc
Diffstat (limited to 'litmus')
-rw-r--r-- | litmus/event_group.c | 11 | ||||
-rw-r--r-- | litmus/rt_domain.c | 3 | ||||
-rw-r--r-- | litmus/sched_mc.c | 21 |
3 files changed, 10 insertions, 25 deletions
diff --git a/litmus/event_group.c b/litmus/event_group.c index 06520299fb1d..478698a6d17a 100644 --- a/litmus/event_group.c +++ b/litmus/event_group.c | |||
@@ -36,8 +36,6 @@ static enum hrtimer_restart on_timer(struct hrtimer *timer) | |||
36 | struct list_head *pos, events[NUM_EVENT_PRIORITIES]; | 36 | struct list_head *pos, events[NUM_EVENT_PRIORITIES]; |
37 | raw_spinlock_t *queue_lock; | 37 | raw_spinlock_t *queue_lock; |
38 | 38 | ||
39 | QT_START; | ||
40 | |||
41 | el = container_of(timer, struct event_list, timer); | 39 | el = container_of(timer, struct event_list, timer); |
42 | queue_lock = &el->group->queue_lock; | 40 | queue_lock = &el->group->queue_lock; |
43 | 41 | ||
@@ -81,8 +79,6 @@ static enum hrtimer_restart on_timer(struct hrtimer *timer) | |||
81 | 79 | ||
82 | VTRACE("Exhausted %d events from list 0x%x\n", num, el); | 80 | VTRACE("Exhausted %d events from list 0x%x\n", num, el); |
83 | 81 | ||
84 | QT_END; | ||
85 | |||
86 | return HRTIMER_NORESTART; | 82 | return HRTIMER_NORESTART; |
87 | } | 83 | } |
88 | 84 | ||
@@ -171,8 +167,6 @@ void add_event(struct event_group *group, struct rt_event *e, lt_t fire) | |||
171 | struct event_list *el; | 167 | struct event_list *el; |
172 | int in_use; | 168 | int in_use; |
173 | 169 | ||
174 | QT_START; | ||
175 | |||
176 | VTRACE("Adding event 0x%x with priority %d for time %llu\n", | 170 | VTRACE("Adding event 0x%x with priority %d for time %llu\n", |
177 | e, e->prio, fire); | 171 | e, e->prio, fire); |
178 | 172 | ||
@@ -207,8 +201,6 @@ void add_event(struct event_group *group, struct rt_event *e, lt_t fire) | |||
207 | } else { | 201 | } else { |
208 | VTRACE("Not my timer @%llu\n", fire); | 202 | VTRACE("Not my timer @%llu\n", fire); |
209 | } | 203 | } |
210 | |||
211 | QT_END; | ||
212 | } | 204 | } |
213 | 205 | ||
214 | /** | 206 | /** |
@@ -222,8 +214,6 @@ void cancel_event(struct rt_event *e) | |||
222 | struct event_group *group; | 214 | struct event_group *group; |
223 | struct list_head *list, *pos; | 215 | struct list_head *list, *pos; |
224 | 216 | ||
225 | QT_START; | ||
226 | |||
227 | VTRACE("Canceling event 0x%x with priority %d\n", e, e->prio); | 217 | VTRACE("Canceling event 0x%x with priority %d\n", e, e->prio); |
228 | group = e->_event_group; | 218 | group = e->_event_group; |
229 | if (!group) return; | 219 | if (!group) return; |
@@ -270,7 +260,6 @@ void cancel_event(struct rt_event *e) | |||
270 | e->_event_group = NULL; | 260 | e->_event_group = NULL; |
271 | 261 | ||
272 | raw_spin_unlock(&group->queue_lock); | 262 | raw_spin_unlock(&group->queue_lock); |
273 | QT_END; | ||
274 | } | 263 | } |
275 | 264 | ||
276 | struct kmem_cache *event_list_cache; | 265 | struct kmem_cache *event_list_cache; |
diff --git a/litmus/rt_domain.c b/litmus/rt_domain.c index 24b7a260e95b..09123eeadf2c 100644 --- a/litmus/rt_domain.c +++ b/litmus/rt_domain.c | |||
@@ -405,8 +405,6 @@ static void pd_requeue(domain_t *dom, struct task_struct *task) | |||
405 | { | 405 | { |
406 | rt_domain_t *domain = (rt_domain_t*)dom->data; | 406 | rt_domain_t *domain = (rt_domain_t*)dom->data; |
407 | 407 | ||
408 | QT_START; | ||
409 | |||
410 | BUG_ON(!task || !is_realtime(task)); | 408 | BUG_ON(!task || !is_realtime(task)); |
411 | TRACE_TASK(task, "Requeueing\n"); | 409 | TRACE_TASK(task, "Requeueing\n"); |
412 | BUG_ON(is_queued(task)); | 410 | BUG_ON(is_queued(task)); |
@@ -423,7 +421,6 @@ static void pd_requeue(domain_t *dom, struct task_struct *task) | |||
423 | add_release(domain, task); | 421 | add_release(domain, task); |
424 | } | 422 | } |
425 | 423 | ||
426 | QT_END; | ||
427 | } | 424 | } |
428 | 425 | ||
429 | /* pd_take_ready - removes and returns the next ready task from the rt_domain | 426 | /* pd_take_ready - removes and returns the next ready task from the rt_domain |
diff --git a/litmus/sched_mc.c b/litmus/sched_mc.c index 3d311505f437..53c24ac2172c 100644 --- a/litmus/sched_mc.c +++ b/litmus/sched_mc.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/pid.h> | 16 | #include <linux/pid.h> |
17 | 17 | ||
18 | #include <litmus/litmus.h> | 18 | #include <litmus/litmus.h> |
19 | #include <litmus/trace.h> | ||
19 | #include <litmus/jobs.h> | 20 | #include <litmus/jobs.h> |
20 | #include <litmus/sched_plugin.h> | 21 | #include <litmus/sched_plugin.h> |
21 | #include <litmus/edf_common.h> | 22 | #include <litmus/edf_common.h> |
@@ -534,8 +535,6 @@ static void remove_from_all(struct task_struct* task) | |||
534 | struct crit_entry *ce; | 535 | struct crit_entry *ce; |
535 | struct domain *dom = get_task_domain(task); | 536 | struct domain *dom = get_task_domain(task); |
536 | 537 | ||
537 | QT_START; | ||
538 | |||
539 | TRACE_MC_TASK(task, "Removing from everything\n"); | 538 | TRACE_MC_TASK(task, "Removing from everything\n"); |
540 | BUG_ON(!task); | 539 | BUG_ON(!task); |
541 | 540 | ||
@@ -572,7 +571,6 @@ static void remove_from_all(struct task_struct* task) | |||
572 | 571 | ||
573 | BUG_ON(is_queued(task)); | 572 | BUG_ON(is_queued(task)); |
574 | raw_spin_unlock(dom->lock); | 573 | raw_spin_unlock(dom->lock); |
575 | QT_END; | ||
576 | } | 574 | } |
577 | 575 | ||
578 | /** | 576 | /** |
@@ -670,7 +668,6 @@ static lt_t __ce_timer_function(struct ce_dom_data *ce_data) | |||
670 | struct domain *dom = ce->domain; | 668 | struct domain *dom = ce->domain; |
671 | struct task_struct *old_link = NULL; | 669 | struct task_struct *old_link = NULL; |
672 | lt_t next_timer_abs; | 670 | lt_t next_timer_abs; |
673 | QT_START; | ||
674 | 671 | ||
675 | TRACE("MC level-A timer callback for CPU %d\n", ce_data->cpu); | 672 | TRACE("MC level-A timer callback for CPU %d\n", ce_data->cpu); |
676 | 673 | ||
@@ -700,7 +697,6 @@ static lt_t __ce_timer_function(struct ce_dom_data *ce_data) | |||
700 | raw_spin_unlock(dom->lock); | 697 | raw_spin_unlock(dom->lock); |
701 | check_for_preempt(dom); | 698 | check_for_preempt(dom); |
702 | } | 699 | } |
703 | QT_END; | ||
704 | return next_timer_abs; | 700 | return next_timer_abs; |
705 | } | 701 | } |
706 | 702 | ||
@@ -712,10 +708,14 @@ static void ce_timer_function(struct rt_event *e) | |||
712 | unsigned long flags; | 708 | unsigned long flags; |
713 | lt_t next_timer_abs; | 709 | lt_t next_timer_abs; |
714 | 710 | ||
711 | TS_LVLA_RELEASE_START; | ||
712 | |||
715 | local_irq_save(flags); | 713 | local_irq_save(flags); |
716 | next_timer_abs = __ce_timer_function(ce_data); | 714 | next_timer_abs = __ce_timer_function(ce_data); |
717 | add_event(per_cpu(cpus, ce_data->cpu).event_group, e, next_timer_abs); | 715 | add_event(per_cpu(cpus, ce_data->cpu).event_group, e, next_timer_abs); |
718 | local_irq_restore(flags); | 716 | local_irq_restore(flags); |
717 | |||
718 | TS_LVLA_RELEASE_END; | ||
719 | } | 719 | } |
720 | #else /* else to CONFIG_MERGE_TIMERS */ | 720 | #else /* else to CONFIG_MERGE_TIMERS */ |
721 | static enum hrtimer_restart ce_timer_function(struct hrtimer *timer) | 721 | static enum hrtimer_restart ce_timer_function(struct hrtimer *timer) |
@@ -725,10 +725,15 @@ static enum hrtimer_restart ce_timer_function(struct hrtimer *timer) | |||
725 | unsigned long flags; | 725 | unsigned long flags; |
726 | lt_t next_timer_abs; | 726 | lt_t next_timer_abs; |
727 | 727 | ||
728 | TS_LVLA_RELEASE_START; | ||
729 | |||
728 | local_irq_save(flags); | 730 | local_irq_save(flags); |
729 | next_timer_abs = __ce_timer_function(ce_data); | 731 | next_timer_abs = __ce_timer_function(ce_data); |
730 | hrtimer_set_expires(timer, ns_to_ktime(next_timer_abs)); | 732 | hrtimer_set_expires(timer, ns_to_ktime(next_timer_abs)); |
731 | local_irq_restore(flags); | 733 | local_irq_restore(flags); |
734 | |||
735 | TS_LVLA_RELEASE_END; | ||
736 | |||
732 | return HRTIMER_RESTART; | 737 | return HRTIMER_RESTART; |
733 | } | 738 | } |
734 | #endif /* CONFIG_MERGE_TIMERS */ | 739 | #endif /* CONFIG_MERGE_TIMERS */ |
@@ -743,15 +748,11 @@ static void mc_release_jobs(rt_domain_t* rt, struct bheap* tasks) | |||
743 | struct task_struct *first = bheap_peek(rt->order, tasks)->value; | 748 | struct task_struct *first = bheap_peek(rt->order, tasks)->value; |
744 | struct domain *dom = get_task_domain(first); | 749 | struct domain *dom = get_task_domain(first); |
745 | 750 | ||
746 | QT_START; | ||
747 | |||
748 | raw_spin_lock_irqsave(dom->lock, flags); | 751 | raw_spin_lock_irqsave(dom->lock, flags); |
749 | TRACE(TS "Jobs released\n", TA(first)); | 752 | TRACE(TS "Jobs released\n", TA(first)); |
750 | __merge_ready(rt, tasks); | 753 | __merge_ready(rt, tasks); |
751 | check_for_preempt(dom); | 754 | check_for_preempt(dom); |
752 | raw_spin_unlock_irqrestore(dom->lock, flags); | 755 | raw_spin_unlock_irqrestore(dom->lock, flags); |
753 | |||
754 | QT_END; | ||
755 | } | 756 | } |
756 | 757 | ||
757 | /** | 758 | /** |
@@ -890,7 +891,6 @@ static struct task_struct* mc_schedule(struct task_struct* prev) | |||
890 | struct cpu_entry* entry = &__get_cpu_var(cpus); | 891 | struct cpu_entry* entry = &__get_cpu_var(cpus); |
891 | int i, out_of_time, sleep, preempt, exists, blocks, global, lower; | 892 | int i, out_of_time, sleep, preempt, exists, blocks, global, lower; |
892 | struct task_struct *dtask = NULL, *ready_task = NULL, *next = NULL; | 893 | struct task_struct *dtask = NULL, *ready_task = NULL, *next = NULL; |
893 | QT_START; | ||
894 | 894 | ||
895 | local_irq_save(flags); | 895 | local_irq_save(flags); |
896 | 896 | ||
@@ -1004,7 +1004,6 @@ static struct task_struct* mc_schedule(struct task_struct* prev) | |||
1004 | TRACE_MC_TASK(next, "Picked this task\n"); | 1004 | TRACE_MC_TASK(next, "Picked this task\n"); |
1005 | } else if (exists && !next) | 1005 | } else if (exists && !next) |
1006 | TRACE_ENTRY(entry, "Becomes idle at %llu\n", litmus_clock()); | 1006 | TRACE_ENTRY(entry, "Becomes idle at %llu\n", litmus_clock()); |
1007 | QT_END; | ||
1008 | return next; | 1007 | return next; |
1009 | } | 1008 | } |
1010 | 1009 | ||