From: Andrew Morton <akpm@linux-foundation.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: linux-kernel@vger.kernel.org, Ingo Molnar <mingo@elte.hu>,
Peter Zijlstra <peterz@infradead.org>,
Frederic Weisbecker <fweisbec@gmail.com>,
Arjan van de Ven <arjan@infradead.org>,
Steven Rostedt <srostedt@redhat.com>
Subject: Re: [PATCH 2/3] trace: fix default boot up tracer
Date: Mon, 2 Feb 2009 21:00:42 -0800 [thread overview]
Message-ID: <20090202210042.fdd589ff.akpm@linux-foundation.org> (raw)
In-Reply-To: <alpine.DEB.1.10.0902022327080.2192@gandalf.stny.rr.com>
On Mon, 2 Feb 2009 23:33:52 -0500 (EST) Steven Rostedt <rostedt@goodmis.org> wrote:
> On Mon, 2 Feb 2009, Andrew Morton wrote:
> > >
> > > The lock_kernel addition was added when the BKL became a spinlock again.
> > > The selftests needed to be able to sleep, and this caused issues.
> >
> > Sleeping inside lock_kernel() is quite OK. Confused.
>
> I did not explain that quite well. I need to focus on the emails
> that I write, and not do it half concentrating on code that I'm
> also writing :-/
>
> The preempt tracer expects preemption enabled when the self test is
> executed. Because the self test for preempt tracer is basically:
>
> start_trace();
> preempt_disable();
> udelay(x);
> preempt_enable();
> stop_trace();
>
> make sure we have a delay.
>
> This failed, because lock_kernel now disables preemption. So that
> preempt_disable() never triggers the trace, and the test sees that nothing
> was recorded. This causes a failure to be flagged, and we disable the
> preempt tracer.
OK.
It might be a bit cleaner to run all the selftests later, after
start_kernel() has done unlock_kernel(). That would make it even
harder to support modular tracers in the future though.
Perhaps the preempt tracer could itself do
if (kernel_locked()) {
kernel_was_locked = true;
unlock_kernel();
}
...
next prev parent reply other threads:[~2009-02-03 5:01 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-03 2:38 [PATCH 0/3] ftrace: updates for tip Steven Rostedt
2009-02-03 2:38 ` [PATCH 1/3] trace: disable branch tracer on alpha Steven Rostedt
2009-02-03 5:19 ` Ingo Molnar
2009-02-03 2:38 ` [PATCH 2/3] trace: fix default boot up tracer Steven Rostedt
2009-02-03 3:50 ` Andrew Morton
2009-02-03 4:12 ` Steven Rostedt
2009-02-03 4:20 ` Andrew Morton
2009-02-03 4:33 ` Steven Rostedt
2009-02-03 5:00 ` Andrew Morton [this message]
2009-02-03 5:29 ` Ingo Molnar
2009-02-03 9:26 ` Frederic Weisbecker
2009-02-03 2:38 ` [PATCH 3/3] trace: let boot trace be chosen by command line Steven Rostedt
2009-02-03 5:31 ` Ingo Molnar
2009-02-03 9:31 ` Frederic Weisbecker
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=20090202210042.fdd589ff.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=arjan@infradead.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 \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.