[PATCH v2 1/2] virtio: support unlocked queue poll

2013-07-08 Thread Michael S. Tsirkin
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

[PATCH v2 1/2] virtio: support unlocked queue poll

2013-07-08 Thread Michael S. Tsirkin
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