linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Ingo Molnar <mingo@elte.hu>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: [RT] possible bug in trace_start_sched_wakeup
Date: Thu, 26 Jan 2006 20:57:02 -0500	[thread overview]
Message-ID: <1138327022.7814.8.camel@localhost.localdomain> (raw)

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


             reply	other threads:[~2006-01-27  1:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-27  1:57 Steven Rostedt [this message]
2006-01-27  4:38 ` [RT] possible bug in trace_start_sched_wakeup 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1138327022.7814.8.camel@localhost.localdomain \
    --to=rostedt@goodmis.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).