From: "Frédéric Weisbecker" <fweisbec@gmail.com>
To: "Ingo Molnar" <mingo@elte.hu>
Cc: "Steven Rostedt" <rostedt@goodmis.org>,
"Linux Kernel" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] tracing/ftrace: use preempt_enable_no_resched_notrace in ring_buffer_time_stamp()
Date: Tue, 16 Dec 2008 23:38:51 +0100 [thread overview]
Message-ID: <c62985530812161438m2490e67dk42d79cd7fc1f1365@mail.gmail.com> (raw)
In-Reply-To: <20081216215033.GV14787@elte.hu>
2008/12/16 Ingo Molnar <mingo@elte.hu>:
>
> * Frédéric Weisbecker <fweisbec@gmail.com> wrote:
>
>> 2008/12/16 Ingo Molnar <mingo@elte.hu>:
>> >
>> > * Frederic Weisbecker <fweisbec@gmail.com> wrote:
>> >
>> >> Impact: prevent a trace recursion
>> >>
>> >> After some tests with function graph tracer under x86-32, I saw some recursions
>> >> caused by ring_buffer_time_stamp() that calls preempt_enable_no_notrace() which
>> >> calls preempt_schedule() which is traced itself.
>> >>
>> >> This patch re-enables preemption without rescheduling.
>> >>
>> >> Cc: Steven Rostedt <rostedt@goodmis.org>
>> >> Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
>> >> ---
>> >> kernel/trace/ring_buffer.c | 2 +-
>> >> 1 files changed, 1 insertions(+), 1 deletions(-)
>> >
>> > applied to tip/tracing/ftrace, thanks Frederic!
>> >
>> > Does this explain+fix the weird crashes/reboots you were seeing?
>> >
>> > Ingo
>> >
>>
>> No, actually the functions tracers are protected against recursion,
>> but rescheduling attempts
>> during all trace insertions (and moreover a call to
>> prepare_ftrace_return with cancelled insertion)
>> is a useless payload.
>>
>> The hard reboots I've seen are related to x86-64 while
>> disabling/reenabling a CPU through /sys/device/system/cpu No tracer was
>> enabled at these times (the problem still remains with latest updates on
>> -tip for half an hour).
>>
>> One other thing: I've seen these pointless calls to preempt_schedule
>> while testing the function graph tracer on VirtualBox. Since it provides
>> virtual serial lines, it was more easy to debug than usual (I haven't
>> any serial line on my box). The function graph tracer hangs on
>> VirtualBox with a x86-32 -tip. It seems that the tracing is too slow and
>> so hrtimer_interrupt() does an eternal loop, assuming that a new time
>> update has to be done (because too much time elapsed during th tracing)
>> after each iteration. I'm not sure what to do...disabling tracing for
>> hrtimers or....
>
> reduce HZ?
>
> Ingo
>
I just switched from 250 to 100 HZ. And it remains the same. But I
commented out the early_printk which could consume some
time too.
Perhaps there is one other thing that makes it hanging. I will
investigate more...
Did someone make some tests with function graph tracer on 32 bits
these last days?
prev parent reply other threads:[~2008-12-16 22:39 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-16 21:08 Frederic Weisbecker
2008-12-16 21:20 ` Ingo Molnar
2008-12-16 21:39 ` Frédéric Weisbecker
2008-12-16 21:43 ` Steven Rostedt
2008-12-16 21:48 ` Frédéric Weisbecker
2008-12-16 21:55 ` Frédéric Weisbecker
2008-12-16 21:59 ` Ingo Molnar
2008-12-16 22:53 ` Steven Rostedt
2008-12-16 21:50 ` Ingo Molnar
2008-12-16 22:38 ` Frédéric Weisbecker [this message]
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=c62985530812161438m2490e67dk42d79cd7fc1f1365@mail.gmail.com \
--to=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--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
all inboxes | Powered by JetHome®