lkml.org 
[lkml]   [2005]   [Dec]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: Semantics of smp_mb() [was : Re: [PATCH] Fix RCU race in access of nohz_cpu_mask ]
    On Mon, Dec 12, 2005 at 11:49:07AM +1100, Keith Owens wrote:
    > >On the contrary. I did some digging and asking and thinking about this
    > >for the Unreliable Guide to Kernel Locking, years ago:
    > >
    > >wmb() means all writes preceeding will complete before any writes
    > >following are started.
    > >rmb() means all reads preceeding will complete before any reads
    > >following are started.
    > >mb() means all reads and writes preceeding will complete before any
    > >reads and writes following are started.
    >
    > FWIW, wmb() on IA64 does not require that preceding stores are flushed
    > to main memory. It only requires that they be "made visible to other
    > processors in the coherence domain". "visible" means that the updated
    > value must reach (at least) an externally snooped cache. There is no
    > requirement that the preceding stores be flushed all the way to main
    > memory, the updates only have to get as far as a cache level that other
    > cpus can see. The cache snooping takes care of flushing to main memory
    > when necessary.

    For the context of the problem that we are dealing with, I think this fact
    that writes are made "visible" to other CPUs (before smp_mb() finishes and
    before other reads are started) is good enough.

    Oleg, with all these inputs, I consider the patch I had sent to be correct.
    Let me know if you still have some lingering doubts!

    P.S :- Thanks to everybody who reponded clarifying this subject.


    --


    Thanks and Regards,
    Srivatsa Vaddagiri,
    Linux Technology Center,
    IBM Software Labs,
    Bangalore, INDIA - 560017
    -
    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: 2005-12-12 09:43    [W:2.425 / U:0.016 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site