From: Lai Jiangshan <laijs@cn.fujitsu.com>
To: rostedt@goodmis.org
Cc: Ingo Molnar <mingo@elte.hu>, Li Zefan <lizf@cn.fujitsu.com>,
Frederic Weisbecker <fweisbec@gmail.com>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [BUG] WARNING: at kernel/trace/ring_buffer.c:3420
Date: Tue, 09 Mar 2010 11:35:24 +0800 [thread overview]
Message-ID: <4B95C1FC.9030307@cn.fujitsu.com> (raw)
In-Reply-To: <1268060858.10871.1807.camel@gandalf.stny.rr.com>
Steven Rostedt wrote:
> On Mon, 2010-03-08 at 10:03 -0500, Steven Rostedt wrote:
>
>>> ringbuffer resizing and reseting will increase the ->record_disabled
>>> and then wait until a rcu_shced grace period passes.
>>>
>>> Contrarily, testing ->record_disabled should be at the same
>>> preempt disabled critical region as writing into ringbuffer, otherwise
>>> it will leave a window break ringbuffer resizing or reseting.
>> So the resizing and the resetting need a synchronize_sched() after the
>> disabling of the buffers, right?
>
> Looking at the code, the synchronize_sched() is already done in
> ring_buffer_resize, and the caller (trace.c:tracing_reset() ) also
> disables the ring buffer and calls synchronize_sched().
>
> With that, what other window is still opened (after this fix)?
>
This window is still opened: (RCU vs IDLE vs Tracing)
synchronize_sched() does not protect preempt_disable()/enable() for
idle process. But tracing(function_graph, function) introduce more
preempt_disable()/enable() for idle process. It brings windows.
I bet that this bug is not come from this window.
(I added some strict code to RCU and did stress test,
bug was still occurred.)
next prev parent reply other threads:[~2010-03-09 3:35 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-08 6:04 [BUG] WARNING: at kernel/trace/ring_buffer.c:3420 Li Zefan
2010-03-08 6:50 ` Lai Jiangshan
2010-03-08 15:03 ` Steven Rostedt
2010-03-08 15:07 ` Steven Rostedt
2010-03-09 3:35 ` Lai Jiangshan [this message]
2010-03-09 3:54 ` Steven Rostedt
2010-03-09 17:28 ` Steven Rostedt
2010-03-09 18:46 ` Steven Rostedt
2010-03-13 12:24 ` [tip:tracing/urgent] ring-buffer: Move disabled check into preempt disable section tip-bot for Lai Jiangshan
2010-03-08 14:54 ` [BUG] WARNING: at kernel/trace/ring_buffer.c:3420 Steven Rostedt
2010-03-09 1:08 ` Li Zefan
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=4B95C1FC.9030307@cn.fujitsu.com \
--to=laijs@cn.fujitsu.com \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lizf@cn.fujitsu.com \
--cc=mingo@elte.hu \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox