lkml.org 
[lkml]   [2011]   [Feb]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: [PATCH v2] oprofile: add SMP barriers for hrtimer hotplug code
    From
    Hi,

    2011/2/1 Santosh Shilimkar <santosh.shilimkar@ti.com>:
    >> -----Original Message-----
    >> From: Will Deacon [mailto:will.deacon@arm.com]
    >> diff --git a/drivers/oprofile/timer_int.c
    >> b/drivers/oprofile/timer_int.c
    >> index 0107251..a3a94ea 100644
    >> --- a/drivers/oprofile/timer_int.c
    >> +++ b/drivers/oprofile/timer_int.c
    >> @@ -48,6 +48,7 @@ static int oprofile_hrtimer_start(void)
    >>  {
    >>       get_online_cpus();
    >>       ctr_running = 1;
    >> +     smp_mb();
    >>       on_each_cpu(__oprofile_hrtimer_start, NULL, 1);

    Just a little question:

    Before calling __oprofile_hrtimer_start in other CPUs,
    there have been some smp_mb executed already, such as called by
    smp_call_function_many in current CPU, and called by
    generic_smp_call_function_interrupt in the func-calling CPU,
    so are these smp_mb enough for correct order of access
    for 'ctr_running' ?

    >>       put_online_cpus();
    >>       return 0;

    thanks,
    --
    Lei Ming
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2011-02-01 09:07    [W:0.022 / U:32.328 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site