lkml.org 
[lkml]   [2011]   [Jun]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [patch 1/4] x86, mtrr: lock stop machine during MTRR rendezvous sequence
    From
    Date
    On Wed, 2011-06-22 at 15:20 -0700, Suresh Siddha wrote:
    > +#ifdef CONFIG_SMP
    > + /*
    > + * If we are not yet online, then there can be no stop_machine() in
    > + * parallel. Stop machine ensures this by using get_online_cpus().
    > + *
    > + * If we are online, then we need to prevent a stop_machine() happening
    > + * in parallel by taking the stop cpus mutex.
    > + */
    > + if (cpu_online(raw_smp_processor_id()))
    > + mutex_lock(&stop_cpus_mutex);
    > +#endif

    This reads like an optimization, is it really worth-while to not take
    the mutex in the rare offline case?


    \
     
     \ /
      Last update: 2011-06-23 11:09    [W:0.020 / U:10.512 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site