[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20131019151919.2d4778d2@gandalf.local.home>
Date: Sat, 19 Oct 2013 15:19:19 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>,
Petr Mladek <pmladek@...e.cz>,
Frederic Weisbecker <fweisbec@...il.com>,
Jiri Kosina <jkosina@...e.cz>, linux-kernel@...r.kernel.org,
x86@...nel.org, "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
Subject: Re: [PATCH 2/6] x86: allow to call text_poke_bp during boot
[ Added Paul because he'll understand this ]
On Sat, 19 Oct 2013 15:16:58 -0400
Steven Rostedt <rostedt@...dmis.org> wrote:
> On Sun, 20 Oct 2013 00:02:32 +0900
> Masami Hiramatsu <masami.hiramatsu.pt@...achi.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists