mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Jiri Olsa <jolsa@redhat.com>
Cc: Oleg Nesterov <oleg@redhat.com>,
	fweisbec@gmail.com, mingo@redhat.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCHv2] tracing - avoid soft lockup in trace_pipe
Date: Thu, 24 Mar 2011 23:14:49 -0400	[thread overview]
Message-ID: <1301022889.14261.167.camel@gandalf.stny.rr.com> (raw)
In-Reply-To: <1301019798.14261.159.camel@gandalf.stny.rr.com>

On Thu, 2011-03-24 at 22:23 -0400, Steven Rostedt wrote:

> > > 
> > > 
> > > ---
> > > running following commands:
> > > 
> > >   # enable the binary option
> > >   echo 1 > ./options/bin
> > >   # disable context info option
> > >   echo 0 > ./options/context-info 
> > >   # tracing only events
> > >   echo 1 > ./events/enable
> > >   cat trace_pipe

OK, I'm trying to reproduce this, but I'm not able to.

I disabled preemption, recompiled and rebooted, and I did the above and
all I get is the numbers printing. But I can exit out with a simple ^C.

No soft lockups or anything.


I'm not saying that your patch is useless, it does seem to clean things
up. But I'm not seeing any lockups here.

The while loop will always exit when the ring buffer is empty.

You mean if the events are filling quicker than the loop then we have
this issue. Perhaps I'm not triggering enough events?

-- Steve

> > > 
> > > is causing lockup (in NON preemptive kernels) inside
> > > tracing_read_pipe function.
> > > 
> > > The reason are:
> > >  - bin/hex/raw output functions for events are set to
> > >    trace_nop_print function, which prints nothing and
> > >    returns TRACE_TYPE_HANDLED value
> > >  - LOST EVENT trace do not handle trace_seq overflow
> > > 
> > > These reasons force the while loop in tracing_read_pipe
> > > function never to break.
> > > 
> > > The attached patch fixies handling of lost event trace, and
> > > changes trace_nop_print to print minimal info, which is needed
> > > for the correct tracing_read_pipe processing.
> > > 
> > > v2 changes:
> > >  - omit the cond_resched changes by trace_nop_print changes
> > >  - WARN changed to WARN_ONCE and added info to be able
> > >    to find out the culprit
> 



  reply	other threads:[~2011-03-25  3:14 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-12 22:59 [PATCH 0/2] " Jiri Olsa
2011-03-12 22:59 ` [PATCH 1/2] tracing - trace lost events properly Jiri Olsa
2011-03-12 22:59 ` [PATCH 2/2] tracing - putting cond_resched into tace_pipe loop Jiri Olsa
2011-03-13 14:58   ` Oleg Nesterov
2011-03-14 14:07     ` Steven Rostedt
2011-03-14 14:18       ` Jiri Olsa
2011-03-14 14:28         ` Steven Rostedt
2011-03-14 15:07           ` Jiri Olsa
2011-03-14 15:20             ` Steven Rostedt
2011-03-14 18:06               ` [PATCHv2] tracing - avoid soft lockup in trace_pipe Jiri Olsa
2011-03-21 12:10                 ` Jiri Olsa
2011-03-25  2:23                   ` Steven Rostedt
2011-03-25  3:14                     ` Steven Rostedt [this message]
2011-03-25 11:05                       ` [PATCHv3] " Jiri Olsa
2011-03-25 15:46                         ` Steven Rostedt
2011-03-25 15:49                         ` Steven Rostedt
2011-03-25 15:53                           ` Jiri Olsa
2011-04-27 15:22                         ` [tip:perf/core] tracing: Avoid " tip-bot for Jiri Olsa

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=1301022889.14261.167.camel@gandalf.stny.rr.com \
    --to=rostedt@goodmis.org \
    --cc=fweisbec@gmail.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=oleg@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®