linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RT] possible bug in trace_start_sched_wakeup
@ 2006-01-27  1:57 Steven Rostedt
  2006-01-27  4:38 ` Steven Rostedt
  0 siblings, 1 reply; 6+ messages in thread
From: Steven Rostedt @ 2006-01-27  1:57 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: LKML

Ingo,

I've been agonizing over the latency code, and have a question about
__trace_start_sched_wakup.

Here we have:

void __trace_start_sched_wakeup(struct task_struct *p)
{
	struct cpu_trace *tr;
	int cpu;

	if (trace_user_triggered || !wakeup_timing)
		return;

	spin_lock(&sch.trace_lock);
	if (sch.task && (sch.task->prio >= p->prio))
		goto out_unlock;


I don't get the sch.task->prio >= p->prio.  Here the lower the number
the greater the priority.  So this if statement is saying:

If sch.task is either NULL or if p is greater in priority than or equal
to the priority of sch.task then quit.

Then again later in  trace_stop_sched_switched:

		if (sch.task && (sch.task->prio >= p->prio))
			sch.task = NULL;

Again, if p is a higher priority than sch.task we set sch.task to NULL??


What am I missing here?

Thanks,

-- Steve


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-01-27 12:47 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-27  1:57 [RT] possible bug in trace_start_sched_wakeup Steven Rostedt
2006-01-27  4:38 ` Steven Rostedt
2006-01-27  9:46   ` Ingo Molnar
2006-01-27 12:46     ` Steven Rostedt
2006-01-27  9:54   ` Ingo Molnar
2006-01-27 12:47     ` Steven Rostedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).