mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Marcin Slusarz <marcin.slusarz@gmail.com>,
	LKML <linux-kernel@vger.kernel.org>,
	Ingo Molnar <mingo@redhat.com>
Subject: Re: [PATCH] tracing: wake up tasks reading trace_pipe on write to trace_marker
Date: Fri, 06 Aug 2010 17:29:35 -0400	[thread overview]
Message-ID: <1281130175.3352.15.camel@gandalf.stny.rr.com> (raw)
In-Reply-To: <20100806205549.GB5345@nowhere>

On Fri, 2010-08-06 at 22:55 +0200, Frederic Weisbecker wrote:

> > This can't work. trace_printk() and friends must be able to be used
> > anywhere. This can cause race conditions with the rq locks in the
> > scheduler.
> > 
> > But you do bring up a good idea. That is, perhaps we should have a way
> > to attach to known safe tracepoints that we can hook to to check if a
> > wake up should happen or not.
> 
> 
> This could be a simple macro that takes the name of the trace event:
> 
> 
> DEFINE_EVENT(event_tpl, event_name, ...);
> 
> 
> TRACE_EVENT_NO_WAKE(event_name);
> 

Yeah, that may be worth doing for 2.6.37. Might as well also add a
trace_printk_nowake() too, when you know you are in dangerous locations
like the scheduler or NMI.


> I think trace events should be wakeable by default as it looks safe for
> most of them. But probably we don't want that per event class.
> 
> In the unsafe list, I only have some sched and lock events in
> mind, but I bet there are some others.

Yep, will put that on my todo list.

Thanks,

-- Steve



  reply	other threads:[~2010-08-06 21:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-27 22:44 Marcin Slusarz
2010-08-06 20:38 ` Steven Rostedt
2010-08-06 20:55   ` Frederic Weisbecker
2010-08-06 21:29     ` Steven Rostedt [this message]
2010-08-06 21:50       ` Frederic Weisbecker

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=1281130175.3352.15.camel@gandalf.stny.rr.com \
    --to=rostedt@goodmis.org \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcin.slusarz@gmail.com \
    --cc=mingo@redhat.com \
    /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

all inboxes | Powered by JetHome®