lkml.org 
[lkml]   [2014]   [Jul]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH RFC] percpu: add data dependency barrier in percpu accessors and operations
    On Tue, 15 Jul 2014, Paul E. McKenney wrote:

    > Sorry, but whether you see it or not, there is a very real need for at
    > least an smp_wmb() from the initializing code and at least an
    > smp_read_barrier_depends() from the reading code.

    Nope this is the wrong approach. Adding synchronization to basic
    primitives that are designed to be as fast as possible is not good. Even
    if it does nothing it tends to bloat over time and get the wrong ideas in
    peoples heads.

    Fixing this is possible by making sure that the remote cachelines are
    evicted on alloc_percpu. alloc_percpu should not be allowed to return
    until it has made sure that the remote cachelines all have been evicted.
    On some weak ordered platforms that may require special instructions or
    even an IPI to move the initilization done by alloc_percpu to the remote
    cpu.



    \
     
     \ /
      Last update: 2014-07-16 17:21    [W:4.177 / U:1.696 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site