[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20131120163318.10253e43@gandalf.local.home>
Date: Wed, 20 Nov 2013 16:33:18 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: Juri Lelli <juri.lelli@...il.com>
Cc: peterz@...radead.org, tglx@...utronix.de, mingo@...hat.com,
oleg@...hat.com, fweisbec@...il.com, darren@...art.com,
johan.eker@...csson.com, p.faure@...tech.ch,
linux-kernel@...r.kernel.org, claudio@...dence.eu.com,
michael@...rulasolutions.com, fchecconi@...il.com,
tommaso.cucinotta@...up.it, nicola.manica@...i.unitn.it,
luca.abeni@...tn.it, dhaval.giani@...il.com, hgu1972@...il.com,
paulmck@...ux.vnet.ibm.com, raistlin@...ux.it,
insop.song@...il.com, liming.wang@...driver.com, jkacur@...hat.com,
harald.gustafsson@...csson.com, vincent.guittot@...aro.org,
bruce.ashfield@...driver.com
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@...il.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists