lkml.org 
[lkml]   [2013]   [Oct]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 2/6] x86: allow to call text_poke_bp during boot
    On Sat, 19 Oct 2013 14:33:50 -0700
    "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> 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, 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)
    >

    Bah! And for such a simple computation, I got it wrong.


    /* Ideally we would like to run on zero CPUS! */
    if (num_online_cpus > 1)

    But I guess the question comes. If we are running on zero CPUS, should
    we perform the "on_each_cpu(do_sync_core, NULL, 1);" or not? Same goes
    with 5i-3 CPUS, or negative number CPUs. If we need to do on_each_cpu(),
    then I guess the != 1 will suffice.

    -- Steve


    \
     
     \ /
      Last update: 2013-10-20 00:21    [W:3.371 / U:0.060 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site