From 6e515de45f1ad108a8ae08d0be1b6f7bf2a707b6 Mon Sep 17 00:00:00 2001 From: Jonathan Herman Date: Mon, 1 Oct 2012 22:02:02 -0400 Subject: Create per-task containers only when budget enforcing. --- litmus/sched_mc.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'litmus') diff --git a/litmus/sched_mc.c b/litmus/sched_mc.c index 2f4eb82b2220..f24c51653fe2 100644 --- a/litmus/sched_mc.c +++ b/litmus/sched_mc.c @@ -48,7 +48,6 @@ * * Should BE be moved into the kernel? This will require benchmarking. */ - #include #include #include @@ -127,7 +126,6 @@ static int interrupt_cpu; static int sid(struct crit_entry *ce) { int level = ce->level * num_online_cpus() + crit_cpu(ce)->cpu + 1; - BUG_ON(level >= 0); return -level; } @@ -852,9 +850,14 @@ static void mc_task_new(struct task_struct *t, int on_rq, int running) entry = &per_cpu(cpus, task_cpu(t)); t->rt_param._domain = entry->crit_entries[level].domain; - sched_trace_container_param(t->pid, name); - sched_trace_server_param(-t->pid, t->pid, - get_exec_cost(t), get_rt_period(t)); + if (budget_enforced(t)) { + /* Userspace and kernelspace view of task state may differ. + * Model kernel state as an additional container + */ + sched_trace_container_param(t->pid, name); + sched_trace_server_param(-t->pid, t->pid, + get_exec_cost(t), get_rt_period(t)); + } /* Setup job params */ release_at(t, litmus_clock()); -- cgit v1.2.2