lkml.org 
[lkml]   [2016]   [May]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [RFC][PATCH 2/3] locking: Annotate spin_unlock_wait() users
    On Tue, May 24, 2016 at 09:17:13AM -0700, Linus Torvalds wrote:

    > This needs to be either hidden inside the basic spinlock functions,
    > _or_ it needs to be a clear and unambiguous interface. Anything that
    > starts talking about control dependencies is not it.
    >
    > Note that this really is about naming and use, not about
    > implementation. So something like "spin_sync_after_unlock_wait()" is
    > acceptable, even if the actual _implementation_ were to be exactly the
    > same as the "after_ctrl_dep()" crap.

    OK; so I would prefer to keep the smp_acquire__after_ctrl_dep() crap for
    common use in smp_cond_acquire() and such, but I'd be more than happy to
    just stuff it unconditionally into spin_unlock_wait().

    Most users really need it, and its restores intuitive semantics to the
    primitive.

    I'm assuming the explicit use then left in ipc/sem.c (as paired with the
    spin_is_locked) is fine with you; that's certainly not driver code.

    Todays series was really more about auditing all the spin_unlock_wait()
    usage sites.

    \
     
     \ /
      Last update: 2016-05-24 19:21    [W:3.339 / U:0.160 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site