]> git.baikalelectronics.ru Git - kernel.git/commit
virtio: remove bogus barriers from DEBUG version of virtio_ring.c
authorRusty Russell <rusty@rustcorp.com.au>
Wed, 24 Feb 2010 20:22:22 +0000 (14:22 -0600)
committerRusty Russell <rusty@rustcorp.com.au>
Wed, 24 Feb 2010 03:52:24 +0000 (14:22 +1030)
commitbbe955604f00a16599a2db1b6488025b8b786fed
tree1593d2a0f0ff19c4deb731d6079997e79989c8b1
parent587d3ee7eac703d6b9b8217fa16ca0cd059a372e
virtio: remove bogus barriers from DEBUG version of virtio_ring.c

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: Rusty Russell <rusty@rustcorp.com.au>
drivers/virtio/virtio_ring.c