lkml.org 
[lkml]   [2009]   [May]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH 1/2] perf_counter: dynamically allocate tasks' perf_counter_context struct [v2]
    From
    Date
    On Fri, 2009-05-22 at 14:17 +1000, Paul Mackerras wrote:
    > + /*
    > + * Make sure other cpus see correct values for *ctx
    > + * once task->perf_counter_ctxp is visible to them.
    > + */
    > + smp_wmb();
    > + tctx = cmpxchg(&task->perf_counter_ctxp, NULL, ctx);


    Documentation/memory-barriers.txt:

    > Any atomic operation that modifies some state in memory and returns information
    > about the state (old or new) implies an SMP-conditional general memory barrier
    > (smp_mb()) on each side of the actual operation (with the exception of
    > explicit lock operations, described later). These include:

    > cmpxchg();






    \
     
     \ /
      Last update: 2009-05-22 10:09    [W:0.022 / U:29.972 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site