[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH v2 5/7] virtio-blk: Call virtio_add_queue_aio
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-block] [PATCH v2 5/7] virtio-blk: Call virtio_add_queue_aio |
Date: |
Tue, 28 Jun 2016 17:30:31 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 |
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
- Re: [Qemu-block] [PATCH v2 1/7] virtio-bus: Drop "set_handler" parameter, (continued)
- [Qemu-block] [PATCH v2 2/7] virtio: Add typedef for handle_output, Fam Zheng, 2016/06/24
- [Qemu-block] [PATCH v2 4/7] virtio: Use aio_set_event_notifier for aio vq, Fam Zheng, 2016/06/24
- [Qemu-block] [PATCH v2 3/7] virtio: Introduce virtio_add_queue_aio, Fam Zheng, 2016/06/24
- [Qemu-block] [PATCH v2 6/7] virtio-scsi: Call virtio_add_queue_aio, Fam Zheng, 2016/06/24
- [Qemu-block] [PATCH v2 5/7] virtio-blk: Call virtio_add_queue_aio, Fam Zheng, 2016/06/24
- [Qemu-block] [PATCH v2 7/7] Revert "mirror: Workaround for unexpected iohandler events during completion", Fam Zheng, 2016/06/24
- Re: [Qemu-block] [PATCH v2 0/7] virtio: Merge virtio-{blk, scsi} host notifier handling paths, Stefan Hajnoczi, 2016/06/28