On 28/06/2016 17:12, Stefan Hajnoczi wrote:\
> It's weird that virtio_add_queue_aio() doesn't take an AioContext.
> 
> This change moves us one step closer to dropping dataplane-specific
> code.  The difference between dataplane and non-dataplane should simply
> by the virtqueue's AioContext, which should come from BlockBackend's
> AioContext.
> 
> Anyway, not a deal-breaker but I think we should make the AioContext
> explicit in the future...

I agree, and in fact I think that the virtio_add_queue_aio API should be
temporary.

Hopefully, now that ioeventfd APIs have been cleaned up and all backends
have support for it, we can move the ioeventfd down from the proxy
devices (virtio-*-pci) to the actual virtio devices.  This would let
virtio-blk and virtio-scsi know whether ioeventfd is in use (they
currently can't see that), and start the dataplane event handlers on the
first kick when ioeventfd is enabled.  For them to do this it is not
necessary to use virtio_add_queue_aio; the first kick can use the normal
virtio_add_queue registration functions.

However, this fix is much nicer than the one we currently have, so I am
in favor of it.  I would squash patches 3 and 4 together, though.

Paolo
Paolo

Reply via email to