public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: "Frédéric Weisbecker" <fweisbec@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>,
	Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 3/4] tracing/branch-tracer: Fix a trace recursion on branch tracer
Date: Sun, 16 Nov 2008 07:49:48 +0100	[thread overview]
Message-ID: <20081116064948.GD32215@elte.hu> (raw)
In-Reply-To: <c62985530811152232q2794ce1o6732c241821c6eca@mail.gmail.com>


* Frédéric Weisbecker <fweisbec@gmail.com> wrote:

> 2008/11/16 Ingo Molnar <mingo@elte.hu>:
> >
> > * Frederic Weisbecker <fweisbec@gmail.com> wrote:
> >
> >> Impact: Make the branch tracer use raw irq save/restore
> >>
> >> When the branch tracer inserts an event through
> >> probe_likely_condition(), it calls local_irq_save() and then results
> >> in a trace recursion.
> >>
> >> local_irq_save() -> trace_hardirqs_off() -> trace_hardirqs_off_caller()
> >>       -> unlikely()
> >>
> >> The trace_branch.c file is protected by DISABLE_BRANCH_PROFILING but
> >> that doesn't prevent from external call to functions that use
> >> unlikely().
> >>
> >> My box crashed each time I tried to set this tracer (sudden and hard
> >> reboot).
> >
> > So this patch fixes that problem, or are there other problems left?
> >
> >        Ingo
> >
> 
> 
> I forgot to answer to all. Yes that fixes it.

cool - i was seeing the crashes too in automated testing, just havent 
had time to debug it yet.

One small detail:

Regarding the "Impact" line, it's cool that you started adding them. 
I'd like to ask you to tweak them a little bit in the future: please 
try to describe the "practical impact" via them - not just a 
repetition of the source code change that the patch does.

For example, for this patch, instead of this impact-line:

  Impact: Make the branch tracer use raw irq save/restore

a better one is:

  Impact: fix crash when enabling the branch-tracer

(i changed it in this patch, no need to resubmit. And it's not well 
documented anyway.)

Thanks,

	Ingo

  reply	other threads:[~2008-11-16  6:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-16  4:59 [PATCH 3/4] tracing/branch-tracer: Fix a trace recursion on branch tracer Frederic Weisbecker
2008-11-16  6:22 ` Ingo Molnar
2008-11-16  6:32   ` Frédéric Weisbecker
2008-11-16  6:49     ` Ingo Molnar [this message]
2008-11-16 14:01       ` Frédéric Weisbecker
2008-11-16 22:10         ` Jonathan Corbet
2008-11-17 11:30           ` 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=20081116064948.GD32215@elte.hu \
    --to=mingo@elte.hu \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --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