All of lore.kernel.org
 help / color / mirror / Atom feed
From: Frederic Weisbecker <fweisbec@gmail.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@elte.hu>, LKML <linux-kernel@vger.kernel.org>,
	Steven Rostedt <rostedt@goodmis.org>
Subject: Re: [PATCH] tracing: Add task activate/deactivate tracepoints
Date: Mon, 31 May 2010 18:51:37 +0200	[thread overview]
Message-ID: <20100531165135.GD5157@nowhere> (raw)
In-Reply-To: <1275322715.27810.23323.camel@twins>

On Mon, May 31, 2010 at 06:18:35PM +0200, Peter Zijlstra wrote:
> On Mon, 2010-05-31 at 16:48 +0200, Frederic Weisbecker wrote:
> > > Should we maybe cure this and rely on sched_switch() to detect sleeps?
> > > It seems natural since only the current task can go to sleep, its just
> > > that the whole preempt state gets a bit iffy.
> 
> How about something like the below?
> 
> Steve, is that proper usage of CREATE_TRACE_POINT?
> 
> ---
> Subject: sched, trace: Fix sched_switch() prev_state argument
> From: Peter Zijlstra <a.p.zijlstra@chello.nl>
> Date: Mon May 31 18:13:25 CEST 2010
> 
> For CONFIG_PREEMPT=y kernels the sched_switch(.prev_state) argument
> isn't useful because we can get preempted with current->state !=
> TASK_RUNNING without actually getting removed from the runqueue.
> 
> Cure this by treating all preempted tasks as runnable from the
> tracer's point of view.
> 
> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
> ---



Other than Steve's said, the thing looks good.


  parent reply	other threads:[~2010-05-31 16:51 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-28 14:26 [PATCH] tracing: Add task activate/deactivate tracepoints Frederic Weisbecker
2010-05-28 15:15 ` Peter Zijlstra
2010-05-31  8:00   ` Ingo Molnar
2010-05-31  8:12     ` Peter Zijlstra
2010-05-31  8:54       ` Peter Zijlstra
2010-05-31 14:36         ` Frederic Weisbecker
2010-05-31 14:43           ` Peter Zijlstra
2010-05-31 14:48             ` Frederic Weisbecker
2010-05-31 16:18               ` Peter Zijlstra
2010-05-31 16:37                 ` Steven Rostedt
2010-05-31 18:28                   ` Peter Zijlstra
2010-05-31 19:14                     ` Steven Rostedt
2010-05-31 19:16                     ` Steven Rostedt
2010-05-31 16:51                 ` Frederic Weisbecker [this message]
2010-06-01  9:13                 ` [tip:sched/urgent] sched, trace: Fix sched_switch() prev_state argument tip-bot for Peter Zijlstra

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=20100531165135.GD5157@nowhere \
    --to=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.