lkml.org 
[lkml]   [2015]   [Oct]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] kvm: fix waitqueue_active without memory barrier in virt/kvm/async_pf.c
    On Fri, Oct 09, 2015 at 10:45:32AM +0200, Paolo Bonzini wrote:
    > So you need another smp_mb() after prepare_to_wait(). I'm not sure
    > if it's needed also for your original tty report, but I think it is
    > for https://lkml.org/lkml/2015/10/8/989 ("mei: fix waitqueue_active
    > without memory barrier in mei drivers").
    >
    > I wonder if it makes sense to introduce smp_mb__before_spin_lock()
    > and smp_mb__after_spin_unlock(). On x86 the former could be a
    > simple compiler barrier, and on s390 both of them could. But that
    > should be a separate patch.

    Not having actually read or thought about the issue at hand, its
    perfectly valid to pair an smp_mb() with either spin_lock() or
    spin_unlock().

    IOW. MB <-> {ACQUIRE, RELEASE} is a valid pairing.


    \
     
     \ /
      Last update: 2015-10-09 11:01    [W:3.994 / U:0.000 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site