[RT] possible bug in trace_start_sched_wakeup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

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

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux