Re: [PATCH 11/16] sched: add latency tracing for -deadline tasks.

From: Daniel Vacek
Date: Mon Apr 16 2012 - 11:51:21 EST


Hi,

On Wed, Apr 11, 2012 at 23:03, Steven Rostedt <rostedt@xxxxxxxxxxx> 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;
>
> Anyway, perhaps this should be broken up, as we don't want the double
> test, that is, wakeup_rt and wakeup_dl are both checked. Perhaps do:
>
> Â Â Â Âif (wakeup_dl && !dl_task(p))
> Â Â Â Â Â Â Â Âreturn;
> Â Â Â Âelse if (wakeup_rt && !dl_task(p) && !rt_task(p))
> Â Â Â Â Â Â Â Âreturn;
>
> Â Â Â Âif (p->prio >= wakeup_prio || p->prio >= current->prio)
> Â Â Â Â Â Â Â Âreturn;
>
>
> -- Steve

sorry for the question, I'm obviously missing something here but what
is the logic behind this rewrite? In both cases my gcc generates the
same code for me.

nX
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/