aboutsummaryrefslogtreecommitdiffstats
path: root/litmus
diff options
context:
space:
mode:
authorJonathan Herman <hermanjl@cs.unc.edu>2012-10-08 19:56:59 -0400
committerJonathan Herman <hermanjl@cs.unc.edu>2012-10-08 19:56:59 -0400
commit6c264383dfabce5a6cedd9a3b51250757d534d97 (patch)
treed4f012eacae084d2a06e4617b8ba6de4c2113d30 /litmus
parent91dca2e13c86f15343d13b83c328fdab3cfa110a (diff)
Task completion times now based on user-space job execution times.
Diffstat (limited to 'litmus')
-rw-r--r--litmus/sched_litmus.c1
-rw-r--r--litmus/sched_mc.c5
-rw-r--r--litmus/sched_task_trace.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/litmus/sched_litmus.c b/litmus/sched_litmus.c
index 6553948407de..0be9a573003d 100644
--- a/litmus/sched_litmus.c
+++ b/litmus/sched_litmus.c
@@ -12,6 +12,7 @@ static void update_time_litmus(struct rq *rq, struct task_struct *p)
12 delta = 0; 12 delta = 0;
13 /* per job counter */ 13 /* per job counter */
14 p->rt_param.job_params.exec_time += delta; 14 p->rt_param.job_params.exec_time += delta;
15 p->rt_param.user_job.exec_time += delta;
15 /* task counter */ 16 /* task counter */
16 p->se.sum_exec_runtime += delta; 17 p->se.sum_exec_runtime += delta;
17 /* sched_clock() */ 18 /* sched_clock() */
diff --git a/litmus/sched_mc.c b/litmus/sched_mc.c
index 03a214f70233..065c767be846 100644
--- a/litmus/sched_mc.c
+++ b/litmus/sched_mc.c
@@ -673,7 +673,6 @@ static void job_completion(struct task_struct *task, int forced)
673 if (!forced) { 673 if (!forced) {
674 /* Userspace signaled job completion */ 674 /* Userspace signaled job completion */
675 sched_trace_task_completion(current, 0); 675 sched_trace_task_completion(current, 0);
676 mb();
677 setup_user_release(current, get_user_deadline(current)); 676 setup_user_release(current, get_user_deadline(current));
678 677
679 } 678 }
@@ -681,10 +680,10 @@ static void job_completion(struct task_struct *task, int forced)
681 release_server = budget_exhausted(task); 680 release_server = budget_exhausted(task);
682#ifndef CONFIG_PLUGIN_MC_LINUX_SLACK_STEALING 681#ifndef CONFIG_PLUGIN_MC_LINUX_SLACK_STEALING
683 /* Release lowest-criticality task's servers with their userspace tasks, 682 /* Release lowest-criticality task's servers with their userspace tasks,
684 * preventing them from getting behind userspace and forcing idleness 683 * preventing them from turning into ghost tasks and forcing idleness
685 */ 684 */
686 if (tsk_mc_crit(task) == NUM_CRIT_LEVELS - 1) 685 if (tsk_mc_crit(task) == NUM_CRIT_LEVELS - 1)
687 release_server = 1; 686 release_server |= is_ghost(task);
688#endif 687#endif
689 688
690 /* If server has run out of budget, wait until next release 689 /* If server has run out of budget, wait until next release
diff --git a/litmus/sched_task_trace.c b/litmus/sched_task_trace.c
index d6487d3b7837..3f4a0a1081c3 100644
--- a/litmus/sched_task_trace.c
+++ b/litmus/sched_task_trace.c
@@ -198,7 +198,7 @@ feather_callback void do_sched_trace_task_completion(unsigned long id,
198 struct task_struct *t = (struct task_struct*) _task; 198 struct task_struct *t = (struct task_struct*) _task;
199 struct st_event_record* rec = get_record(ST_COMPLETION, t); 199 struct st_event_record* rec = get_record(ST_COMPLETION, t);
200 if (rec) { 200 if (rec) {
201 rec->data.completion.when = get_exec_time(t); 201 rec->data.completion.when = tsk_rt(t)->user_job.exec_time;
202 rec->data.completion.forced = forced; 202 rec->data.completion.forced = forced;
203 put_record(rec); 203 put_record(rec);
204 } 204 }