• Rusty Russell's avatar
    virtio: remove bogus barriers from DEBUG version of virtio_ring.c · 97a545ab
    Rusty Russell authored
    With DEBUG defined, we add an ->in_use flag to detect if the caller
    invokes two virtio methods in parallel.  The barriers attempt to ensure
    timely update of the ->in_use flag.
    
    But they're voodoo: if we need these barriers it implies that the
    calling code doesn't have sufficient synchronization to ensure the
    code paths aren't invoked at the same time anyway, and we want to
    detect it.
    
    Also, adding barriers changes timing, so turning on debug has more
    chance of hiding real problems.
    
    Thanks to MST for drawing my attention to this code...
    
    CC: Michael S. Tsirkin <mst@redhat.com>
    Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
    97a545ab
virtio_ring.c 10.6 KB