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

2013-07-09 Thread Asias He
On Mon, Jul 08, 2013 at 12:04:36PM +0300, Michael S. Tsirkin wrote: > 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 b

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

2013-07-09 Thread Rusty Russell
"Michael S. Tsirkin" writes: > 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.

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

2013-07-08 Thread Jason Wang
On 07/08/2013 05:04 PM, Michael S. Tsirkin wrote: > 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 o

[PATCH 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