virtio: support unlocked queue poll
authorMichael S. Tsirkin <mst@redhat.com>
Tue, 9 Jul 2013 10:19:18 +0000 (13:19 +0300)
committerBen Hutchings <ben@decadent.org.uk>
Fri, 2 Aug 2013 20:14:52 +0000 (22:14 +0200)
commit cc229884d3f77ec3b1240e467e0236c3e0647c0c upstream.

This adds a way to check ring empty state after enable_cb outside any
locks. Will be used by virtio_net.

Note: there's room for more optimization: caller is likely to have a
memory barrier already, which means we might be able to get rid of a
barrier here.  Deferring this optimization until we do some
benchmarking.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[wg: Backported to 3.2]
Signed-off-by: Wolfram Gloger <wmglo@dent.med.uni-muenchen.de>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>

No differences found