aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/litmus/rt_param.h1
-rw-r--r--include/litmus/sched_trace.h2
-rw-r--r--litmus/jobs.c11
-rw-r--r--litmus/sched_task_trace.c3
4 files changed, 10 insertions, 7 deletions
diff --git a/include/litmus/rt_param.h b/include/litmus/rt_param.h
index d84248828cf1..8c996b91ead8 100644
--- a/include/litmus/rt_param.h
+++ b/include/litmus/rt_param.h
@@ -227,6 +227,7 @@ struct rt_param {
227 struct control_page * ctrl_page; 227 struct control_page * ctrl_page;
228 228
229 lt_t max_exec_time; 229 lt_t max_exec_time;
230 lt_t tot_exec_time;
230}; 231};
231 232
232/* Possible RT flags */ 233/* Possible RT flags */
diff --git a/include/litmus/sched_trace.h b/include/litmus/sched_trace.h
index c71a08ab552e..f910c63c067a 100644
--- a/include/litmus/sched_trace.h
+++ b/include/litmus/sched_trace.h
@@ -81,7 +81,7 @@ struct st_sys_release_data {
81}; 81};
82 82
83struct st_task_exit_data { 83struct st_task_exit_data {
84 u64 when; 84 u64 avg_exec_time;
85 u64 max_exec_time; 85 u64 max_exec_time;
86}; 86};
87 87
diff --git a/litmus/jobs.c b/litmus/jobs.c
index fb093c03d53d..50728a416c6c 100644
--- a/litmus/jobs.c
+++ b/litmus/jobs.c
@@ -8,13 +8,14 @@
8 8
9static inline void setup_release(struct task_struct *t, lt_t release) 9static inline void setup_release(struct task_struct *t, lt_t release)
10{ 10{
11 /* prepare next release */ 11 tsk_rt(t)->tot_exec_time += tsk_rt(t)->job_params.exec_time;
12 t->rt_param.job_params.release = release;
13 t->rt_param.job_params.deadline = release + get_rt_relative_deadline(t);
14 t->rt_param.job_params.exec_time = 0;
15 12
13 /* prepare next release */
14 tsk_rt(t)->job_params.release = tsk_rt(t)->job_params.deadline;
15 tsk_rt(t)->job_params.deadline += get_rt_period(t);
16 tsk_rt(t)->job_params.exec_time = 0;
16 /* update job sequence number */ 17 /* update job sequence number */
17 t->rt_param.job_params.job_no++; 18 tsk_rt(t)->job_params.job_no++;
18 19
19 /* don't confuse Linux */ 20 /* don't confuse Linux */
20 t->rt.time_slice = 1; 21 t->rt.time_slice = 1;
diff --git a/litmus/sched_task_trace.c b/litmus/sched_task_trace.c
index 4ada33c6979b..73ce4df517ef 100644
--- a/litmus/sched_task_trace.c
+++ b/litmus/sched_task_trace.c
@@ -231,10 +231,11 @@ feather_callback void do_sched_trace_task_exit(unsigned long id,
231{ 231{
232 struct task_struct *t = (struct task_struct*) _task; 232 struct task_struct *t = (struct task_struct*) _task;
233 const lt_t max_exec_time = tsk_rt(t)->max_exec_time; 233 const lt_t max_exec_time = tsk_rt(t)->max_exec_time;
234 const lt_t avg_exec_time = tsk_rt(t)->tot_exec_time / (get_rt_job(t) - 1);
234 235
235 struct st_event_record *rec = get_record(ST_TASK_EXIT, t); 236 struct st_event_record *rec = get_record(ST_TASK_EXIT, t);
236 if (rec) { 237 if (rec) {
237 rec->data.task_exit.when = now(); 238 rec->data.task_exit.avg_exec_time = avg_exec_time;
238 rec->data.task_exit.max_exec_time = max_exec_time; 239 rec->data.task_exit.max_exec_time = max_exec_time;
239 put_record(rec); 240 put_record(rec);
240 } 241 }