lkml.org 
[lkml]   [2016]   [May]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: sem_lock() vs qspinlocks
    From
    On Mon, May 23, 2016 at 5:25 AM, Peter Zijlstra <peterz@infradead.org> wrote:
    >
    > Paul has smp_mb__after_unlock_lock() for the RCpc 'upgrade'. How about
    > something like:
    >
    > smp_mb__after_lock()

    I'd much rather make the naming be higher level. It's not necessarily
    going to be a "mb", and while the problem is about smp, the primitives
    it is synchronizing aren't actually smp-specific (ie you're
    synchronizing a lock that is relevant on UP too).

    So I'd just call it something like

    spin_lock_sync_after_lock();

    because different locks might have different levels of serialization
    (ie maybe a spinlock needs one thing, and a mutex needs another - if
    we start worrying about ordering between spin_lock and
    mutex_is_locked(), for example, or between mutex_lock() and
    spin_is_locked()).

    Hmm?

    Linus

    \
     
     \ /
      Last update: 2016-05-23 20:01    [W:4.161 / U:0.132 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site