Re: [PATCH 2/6] x86: allow to call text_poke_bp during boot

2013-10-28 Thread Masami Hiramatsu
(2013/10/21 0:42), Paul E. McKenney wrote: > On Sat, Oct 19, 2013 at 06:02:39PM -0400, Steven Rostedt wrote: >> On Sat, 19 Oct 2013 14:33:50 -0700 >> "Paul E. McKenney" wrote: >> >> > It's used to convert the calls to mcount to nops. But maybe a better > thing to do is to check if we only

Re: [PATCH 2/6] x86: allow to call text_poke_bp during boot

2013-10-20 Thread Paul E. McKenney
On Sat, Oct 19, 2013 at 06:02:39PM -0400, Steven Rostedt wrote: > On Sat, 19 Oct 2013 14:33:50 -0700 > "Paul E. McKenney" wrote: > > > > > > 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

Re: [PATCH 2/6] x86: allow to call text_poke_bp during boot

2013-10-19 Thread Steven Rostedt
On Sat, 19 Oct 2013 14:33:50 -0700 "Paul E. McKenney" wrote: > > > 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, t

Re: [PATCH 2/6] x86: allow to call text_poke_bp during boot

2013-10-19 Thread Steven Rostedt
On Sat, 19 Oct 2013 14:33:50 -0700 "Paul E. McKenney" wrote: > > /* Ideally we would like to run on zero CPUS! */ > > if (num_online_cpus() < 2) > > To be really safe, shouldn't you use complex numbers? Just in case > you end up running on a system with 5i-3 CPUs or something. ;-) >

Re: [PATCH 2/6] x86: allow to call text_poke_bp during boot

2013-10-19 Thread Paul E. McKenney
On Sat, Oct 19, 2013 at 03:19:19PM -0400, Steven Rostedt wrote: > > [ Added Paul because he'll understand this ] > > On Sat, 19 Oct 2013 15:16:58 -0400 > Steven Rostedt wrote: > > > On Sun, 20 Oct 2013 00:02:32 +0900 > > Masami Hiramatsu wrote: > > > > > (2013/10/18 23:27), Petr Mladek wrote:

Re: [PATCH 2/6] x86: allow to call text_poke_bp during boot

2013-10-19 Thread Steven Rostedt
[ Added Paul because he'll understand this ] On Sat, 19 Oct 2013 15:16:58 -0400 Steven Rostedt wrote: > On Sun, 20 Oct 2013 00:02:32 +0900 > Masami Hiramatsu wrote: > > > (2013/10/18 23:27), Petr Mladek wrote: > > > We would like to use text_poke_bp in ftrace. It might be called also > > > d

Re: [PATCH 2/6] x86: allow to call text_poke_bp during boot

2013-10-19 Thread Steven Rostedt
On Sun, 20 Oct 2013 00:02:32 +0900 Masami Hiramatsu 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, th

Re: [PATCH 2/6] x86: allow to call text_poke_bp during boot

2013-10-19 Thread Masami Hiramatsu
(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