Messages in this thread | | | Date | Wed, 20 Nov 2013 16:33:18 -0500 | From | Steven Rostedt <> | Subject | Re: [PATCH 08/14] sched: add latency tracing for -deadline tasks. |
| |
On Thu, 7 Nov 2013 14:43:42 +0100 Juri Lelli <juri.lelli@gmail.com> wrote:
> + /* > + * Semantic is like this: > + * - wakeup tracer handles all tasks in the system, independently > + * from their scheduling class; > + * - wakeup_rt tracer handles tasks belonging to sched_dl and > + * sched_rt class; > + * - wakeup_dl handles tasks belonging to sched_dl class only. > + */ > + if ((wakeup_dl && !dl_task(p)) || > + (wakeup_rt && !dl_task(p) && !rt_task(p)) || > + (p->prio >= wakeup_prio || p->prio >= current->prio)) > return; > > pc = preempt_count(); > @@ -486,7 +495,7 @@ probe_wakeup(void *ignore, struct task_struct *p, int success) > arch_spin_lock(&wakeup_lock); > > /* check for races. */ > - if (!tracer_enabled || p->prio >= wakeup_prio) > + if (!tracer_enabled || (!dl_task(p) && p->prio >= wakeup_prio)) > goto out_locked;
We probably want to add a "tracing_dl" variable, and do the test like this:
if (!tracer_enabled || tracing_dl || (!dl_task(p) && p->prio >= wakeup_prio))
and for the first if statement too. Otherwise if two dl tasks are running on two different CPUs, the second will override the first. Once you start tracing a dl_task, you shouldn't bother tracing another task until that one wakes up.
if (dl_task(p)) tracing_dl = 1; else tracing_dl = 0;
-- Steve
| |