From: Steven Rostedt <rostedt@goodmis.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>,
Petr Mladek <pmladek@suse.cz>,
Frederic Weisbecker <fweisbec@gmail.com>,
Jiri Kosina <jkosina@suse.cz>,
linux-kernel@vger.kernel.org, x86@kernel.org,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Subject: Re: [PATCH 2/6] x86: allow to call text_poke_bp during boot
Date: Sat, 19 Oct 2013 15:19:19 -0400 [thread overview]
Message-ID: <20131019151919.2d4778d2@gandalf.local.home> (raw)
In-Reply-To: <20131019151658.583ac18e@gandalf.local.home>
[ Added Paul because he'll understand this ]
On Sat, 19 Oct 2013 15:16:58 -0400
Steven Rostedt <rostedt@goodmis.org> wrote:
> On Sun, 20 Oct 2013 00:02:32 +0900
> Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> wrote:
>
> > (2013/10/18 23:27), Petr Mladek wrote:
> > > We would like to use text_poke_bp in ftrace. It might be called also during
> > > boot when the interupts are disabled. We need to enable them for syncing
> > > the cores on each CPU. Otherwise, there might be a deadlock, see the
> > > warning in "smp_call_function_many", kernel/smp.c:371.
> >
> > Steven, is this really needed?
> > I think if this is the special use(e.g. boottime test),
> > we'd better to run it after boot...
> >
>
> It's used to convert the calls to mcount to nops. But maybe a better
> thing to do is to check if we only have a single CPU:
>
> static void run_sync(void)
> {
> if (num_online_cpus() != 1)
Hmm, to be more robust to handle our future "ideal" machines, perhaps
this should be:
/* Ideally we would like to run on zero CPUS! */
if (num_online_cpus() < 2)
-- Steve
> on_each_cpu(do_sync_core, NULL, 1);
> }
>
>
> I believe that the only time we call this function with interrupts
> disabled is before SMP is set up. Thus, the above change would handle
> that case.
>
> -- Steve
next prev parent reply other threads:[~2013-10-19 19:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-18 14:27 Petr Mladek
2013-10-19 15:02 ` Masami Hiramatsu
2013-10-19 19:16 ` Steven Rostedt
2013-10-19 19:19 ` Steven Rostedt [this message]
2013-10-19 21:33 ` Paul E. McKenney
2013-10-19 21:58 ` Steven Rostedt
2013-10-19 22:02 ` Steven Rostedt
2013-10-20 15:42 ` Paul E. McKenney
2013-10-28 9:18 ` Masami Hiramatsu
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=20131019151919.2d4778d2@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=fweisbec@gmail.com \
--cc=jkosina@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=masami.hiramatsu.pt@hitachi.com \
--cc=paulmck@linux.vnet.ibm.com \
--cc=pmladek@suse.cz \
--cc=x86@kernel.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®