Messages in this thread | | | Date | Mon, 16 Apr 2012 17:51:22 +0200 | Subject | Re: [PATCH 11/16] sched: add latency tracing for -deadline tasks. | From | Daniel Vacek <> |
| |
Hi,
On Wed, Apr 11, 2012 at 23:03, Steven Rostedt <rostedt@goodmis.org> 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |