aboutsummaryrefslogtreecommitdiffstats
path: root/litmus/sched_color.c
diff options
context:
space:
mode:
authorChristopher Kenna <cjk@cs.unc.edu>2012-05-06 21:18:33 -0400
committerChristopher Kenna <cjk@cs.unc.edu>2012-05-06 21:18:33 -0400
commitdb7b8b961c72c9ab079728dea0beb682ba78d56b (patch)
treec7901ae8c478d26c85bd07167414c34bb6b23ed1 /litmus/sched_color.c
parent41bba723584060d4045eaa133d6cde5f83c10f3a (diff)
Add task_exit event that records max exec time under color plugin.
Diffstat (limited to 'litmus/sched_color.c')
-rw-r--r--litmus/sched_color.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/litmus/sched_color.c b/litmus/sched_color.c
index 29516e948749..0448983e13ce 100644
--- a/litmus/sched_color.c
+++ b/litmus/sched_color.c
@@ -205,6 +205,7 @@ static void link(struct rt_server *server, struct task_struct *task)
205static void job_completion(struct rt_server *server) 205static void job_completion(struct rt_server *server)
206{ 206{
207 struct task_struct *t = server->linked; 207 struct task_struct *t = server->linked;
208 lt_t et;
208 209
209 TRACE_TASK(t, "Job completed\n"); 210 TRACE_TASK(t, "Job completed\n");
210 if (is_server(t)) 211 if (is_server(t))
@@ -212,6 +213,13 @@ static void job_completion(struct rt_server *server)
212 else 213 else
213 sched_trace_task_completion(t, 0); 214 sched_trace_task_completion(t, 0);
214 215
216 if (1 < get_rt_job(t)) {
217 /* our releases happen at the second job */
218 et = get_exec_time(t);
219 if (et > tsk_rt(t)->max_exec_time)
220 tsk_rt(t)->max_exec_time = et;
221 }
222
215 unlink(server); 223 unlink(server);
216 set_rt_flags(t, RT_F_SLEEP); 224 set_rt_flags(t, RT_F_SLEEP);
217 prepare_for_next_period(t); 225 prepare_for_next_period(t);
@@ -525,6 +533,8 @@ static void color_task_new(struct task_struct *t, int on_rq, int running)
525 dgl_group_req_init(&group_lock, req); 533 dgl_group_req_init(&group_lock, req);
526 tsk_rt(t)->req = req; 534 tsk_rt(t)->req = req;
527 535
536 tsk_rt(t)->max_exec_time = 0;
537
528 /* Fill request */ 538 /* Fill request */
529 if (tsk_rt(t)->color_ctrl_page) { 539 if (tsk_rt(t)->color_ctrl_page) {
530 colors = tsk_rt(t)->color_ctrl_page->colors; 540 colors = tsk_rt(t)->color_ctrl_page->colors;