diff options
| author | Jonathan Herman <hermanjl@cs.unc.edu> | 2012-05-09 16:34:38 -0400 |
|---|---|---|
| committer | Jonathan Herman <hermanjl@cs.unc.edu> | 2012-05-09 16:34:38 -0400 |
| commit | a80dba56e2bc970b300b32ca3a8f4e911c18bbad (patch) | |
| tree | 3c13910fedfd05c15541dfc1c423e98012857cc3 /litmus | |
| parent | 94984e6987547efb7fc161965d7023fcec88d7da (diff) | |
BE servers now synchronize when task sets are released
Diffstat (limited to 'litmus')
| -rw-r--r-- | litmus/dgl.c | 1 | ||||
| -rw-r--r-- | litmus/sched_color.c | 19 |
2 files changed, 9 insertions, 11 deletions
diff --git a/litmus/dgl.c b/litmus/dgl.c index 6c1267839123..2df27b48fcdf 100644 --- a/litmus/dgl.c +++ b/litmus/dgl.c | |||
| @@ -166,7 +166,6 @@ static unsigned long try_acquire(struct dgl *dgl, struct dgl_resource *resource, | |||
| 166 | } | 166 | } |
| 167 | 167 | ||
| 168 | resource->free_replicas -= req->replicas; | 168 | resource->free_replicas -= req->replicas; |
| 169 | BUG_ON(resource->free_replicas > dgl->num_replicas); | ||
| 170 | 169 | ||
| 171 | TRACE("0x%p acquired %d replicas of rid %d\n", | 170 | TRACE("0x%p acquired %d replicas of rid %d\n", |
| 172 | greq, req->replicas, rid); | 171 | greq, req->replicas, rid); |
diff --git a/litmus/sched_color.c b/litmus/sched_color.c index 22c146014045..6c278f5d26cf 100644 --- a/litmus/sched_color.c +++ b/litmus/sched_color.c | |||
| @@ -675,7 +675,6 @@ static long color_activate_plugin(void) | |||
| 675 | struct rt_task tp; | 675 | struct rt_task tp; |
| 676 | struct task_struct *server_task; | 676 | struct task_struct *server_task; |
| 677 | struct cpu_entry *entry; | 677 | struct cpu_entry *entry; |
| 678 | lt_t now = litmus_clock(); | ||
| 679 | 678 | ||
| 680 | for_each_online_cpu(cpu) { | 679 | for_each_online_cpu(cpu) { |
| 681 | entry = remote_entry(cpu); | 680 | entry = remote_entry(cpu); |
| @@ -699,17 +698,8 @@ static long color_activate_plugin(void) | |||
| 699 | tsk_rt(server_task)->task_params = tp; | 698 | tsk_rt(server_task)->task_params = tp; |
| 700 | tsk_rt(server_task)->present = 1; | 699 | tsk_rt(server_task)->present = 1; |
| 701 | 700 | ||
| 702 | /* Make runnable */ | ||
| 703 | release_at(server_task, now); | ||
| 704 | entry->fifo_server.start_time = 0; | ||
| 705 | entry->scheduled = NULL; | 701 | entry->scheduled = NULL; |
| 706 | 702 | ||
| 707 | cancel_enforcement_timer(&entry->fifo_server.timer); | ||
| 708 | |||
| 709 | if (!is_queued(server_task)) | ||
| 710 | requeue(&entry->rm_domain, server_task); | ||
| 711 | |||
| 712 | |||
| 713 | TRACE_TASK(server_task, "Created server with wcet: %llu, " | 703 | TRACE_TASK(server_task, "Created server with wcet: %llu, " |
| 714 | "period: %llu\n", tp.exec_cost, tp.period); | 704 | "period: %llu\n", tp.exec_cost, tp.period); |
| 715 | 705 | ||
| @@ -761,6 +751,15 @@ static void color_release_ts(lt_t time) | |||
| 761 | trace_litmus_server_param(stask->pid, fifo_cid, | 751 | trace_litmus_server_param(stask->pid, fifo_cid, |
| 762 | get_exec_cost(stask), | 752 | get_exec_cost(stask), |
| 763 | get_rt_period(stask)); | 753 | get_rt_period(stask)); |
| 754 | |||
| 755 | /* Make runnable */ | ||
| 756 | release_at(stask, time); | ||
| 757 | entry->fifo_server.start_time = 0; | ||
| 758 | |||
| 759 | cancel_enforcement_timer(&entry->fifo_server.timer); | ||
| 760 | |||
| 761 | if (!is_queued(stask)) | ||
| 762 | requeue(&entry->rm_domain, stask); | ||
| 764 | } | 763 | } |
| 765 | } | 764 | } |
| 766 | 765 | ||
