From: Tom Zanussi <tzanussi@gmail.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: linux-kernel@vger.kernel.org, Ingo Molnar <mingo@elte.hu>,
Andrew Morton <akpm@linux-foundation.org>,
Thomas Gleixner <tglx@linutronix.de>,
Peter Zijlstra <peterz@infradead.org>,
Frederic Weisbecker <fweisbec@gmail.com>,
Steven Rostedt <srostedt@redhat.com>
Subject: Re: [PATCH 4/4] tracing/filters: use ring_buffer_discard_commit for discarded events
Date: Tue, 07 Apr 2009 00:46:49 -0500 [thread overview]
Message-ID: <1239083209.7220.42.camel@tropicana> (raw)
In-Reply-To: <alpine.DEB.2.00.0904021033080.965@gandalf.stny.rr.com>
On Thu, 2009-04-02 at 11:01 -0400, Steven Rostedt wrote:
> On Thu, 2 Apr 2009, Tom Zanussi wrote:
>
> > Hi Steve,
> >
> > Great to see this! I updated my filter removal rcu patch, made some
> > changes to the filter_check_discard() to work with the new
> > ring_buffer_discard_commit() and made the necessary changes to the
> > ftrace tracers as well - see the patch below, which has only been
> > touch-tested at this point. It seemed to work at first, but then
> > produced an oops, which may well be a problem related to the changes I
> > made. I'll look into it more tomorrow night, and will also fix up this
> > patch and repost it if it basically looks ok. I'll post the oops and
> > the lines of code that it refers to just in case it it rings a bell...
>
> Yeah, it looks like it is related to changes that you made ;-)
>
> >
> > [ 240.461982] ------------[ cut here ]------------
> > [ 240.461993] WARNING: at kernel/trace/ring_buffer.c:1610
> > ring_buffer_discard_commit+0xfa/0x100()
>
> > [ 240.462259] Pid: 6143, comm: bash Not tainted 2.6.29-tip #35
> > [ 240.462267] Call Trace:
> > [ 240.462280] [<ffffffff8025c5c8>] warn_slowpath+0xd8/0x130
> > [ 240.462291] [<ffffffff802c2be5>] ? rb_reserve_next_event+0x45/0x360
> > [ 240.462304] [<ffffffff802c6fc1>] ? trace_buffer_lock_reserve
> > +0x51/0x70
> > [ 240.462316] [<ffffffff802c12ea>] ? ring_buffer_unlock_commit
> > +0x5a/0x60
> > [ 240.462329] [<ffffffff802c2be5>] ? rb_reserve_next_event+0x45/0x360
> > [ 240.462340] [<ffffffff802c30cb>] ? ring_buffer_lock_reserve
> > +0x9b/0xe0
> > [ 240.462354] [<ffffffff8035f42b>] ? dnotify_parent+0xb/0xc0
> > [ 240.462365] [<ffffffff8032af65>] ? vfs_write+0x155/0x1d0
> > [ 240.462375] [<ffffffff802c1e2a>] ring_buffer_discard_commit
> > +0xfa/0x100
> > [ 240.462386] [<ffffffff8035f42b>] ? dnotify_parent+0xb/0xc0
> > [ 240.462396] [<ffffffff802c843b>] trace_function+0xab/0xc0
[...]
> The bug does not stick out in this patch set. Perhaps it is part of the
> original too? But something somewhere is calling the discard outside the
> reserve and commit.
>
It doesn't stick out to me either - the funny thing is that it only
happens with CONFIG_PREEMPT_VOLUNTARY - with CONFIG_PREEMPT it's fine.
In fact, with CONFIG_PREEMPT_VOLUNTARY, an RB_WARN_ON(!preempt_count())
right after frace_preempt_disable() triggers immediately, which unless
I'm missing something, should never happen. Is there a bug in
PREEMPT_VOLUNTARY?
Tom
diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
index 7a6209f..bac9ab7 100644
--- a/kernel/trace/ring_buffer.c
+++ b/kernel/trace/ring_buffer.c
@@ -1494,6 +1494,8 @@ ring_buffer_lock_reserve(struct ring_buffer *buffer, unsigned long length)
/* If we are tracing schedule, we don't want to recurse */
resched = ftrace_preempt_disable();
+ RB_WARN_ON(buffer, !preempt_count());
+
cpu = raw_smp_processor_id();
if (!cpumask_test_cpu(cpu, buffer->cpumask))
> -- Steve
>
next prev parent reply other threads:[~2009-04-07 5:47 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-02 5:27 [PATCH 0/4] [GIT PULL] for tip/tracing/filters Steven Rostedt
2009-04-02 5:27 ` [PATCH 1/4] tracing/filters: add run-time field descriptions to TRACE_EVENT_FORMAT events Steven Rostedt
2009-04-02 12:17 ` Frederic Weisbecker
2009-04-02 5:27 ` Steven Rostedt
2009-04-02 5:27 ` [PATCH 2/4] tracing/filters: add TRACE_EVENT_FORMAT_NOFILTER event macro Steven Rostedt
2009-04-02 5:27 ` [PATCH 3/4] ring-buffer: add ring_buffer_discard_commit Steven Rostedt
2009-04-02 5:48 ` Andrew Morton
2009-04-02 13:08 ` Steven Rostedt
2009-04-02 5:27 ` [PATCH 4/4] tracing/filters: use ring_buffer_discard_commit for discarded events Steven Rostedt
2009-04-02 9:06 ` Tom Zanussi
2009-04-02 15:01 ` Steven Rostedt
2009-04-03 11:51 ` Ingo Molnar
2009-04-04 1:11 ` Steven Rostedt
2009-04-07 5:46 ` Tom Zanussi [this message]
2009-04-07 9:24 ` Steven Rostedt
2009-04-02 5:37 ` [PATCH 0/4] [GIT PULL] for tip/tracing/filters Steven Rostedt
2009-04-03 12:14 ` Ingo Molnar
2009-04-03 14:36 ` Steven Rostedt
2009-04-04 6:50 ` Tom Zanussi
2009-04-04 15:42 ` Steven Rostedt
2009-04-05 7:52 ` Tom Zanussi
2009-04-05 14:47 ` Ingo Molnar
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=1239083209.7220.42.camel@tropicana \
--to=tzanussi@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=srostedt@redhat.com \
--cc=tglx@linutronix.de \
/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®