[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 4/7] virtio: add aio handler
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH 4/7] virtio: add aio handler |
Date: |
Wed, 6 Apr 2016 14:09:12 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 |
On 06/04/2016 13:11, Cornelia Huck wrote:
>> > +static void virtio_queue_notify_aio_vq(VirtQueue *vq)
>> > +{
>> > + if (vq->vring.desc && vq->handle_aio_output) {
>> > + VirtIODevice *vdev = vq->vdev;
>> > +
>> > + trace_virtio_queue_notify(vdev, vq - vdev->vq, vq);
>> > + vq->handle_aio_output(vdev, vq);
>> > + }
>> > +}
>> > +
> So this avoids reentrancy, but might we miss one notify if
> ->handle_aio_output has already been unset? What am I missing?
Calling the notifier just before unset is handled by using "false,
false" when unsetting the notifier, and only setting
vq->handle_aio_output after the notifier has been unset.
Patch 7 makes things clearer.
Paolo
- [Qemu-devel] [PATCH v3 0/7] virtio: aio handler API, Paolo Bonzini, 2016/04/06
- [Qemu-devel] [PATCH 3/7] virtio-scsi: fix disabled mode, Paolo Bonzini, 2016/04/06
- [Qemu-devel] [PATCH 6/7] virtio-scsi: use aio handler for data plane, Paolo Bonzini, 2016/04/06
- [Qemu-devel] [PATCH 1/7] virtio: make virtio_queue_notify_vq static, Paolo Bonzini, 2016/04/06
- [Qemu-devel] [PATCH 5/7] virtio-blk: use aio handler for data plane, Paolo Bonzini, 2016/04/06
- [Qemu-devel] [PATCH 7/7] virtio: merge virtio_queue_aio_set_host_notifier_handler with virtio_queue_set_aio, Paolo Bonzini, 2016/04/06
- Re: [Qemu-devel] [PATCH v3 0/7] virtio: aio handler API, Cornelia Huck, 2016/04/06
- Re: [Qemu-devel] [PATCH v3 0/7] virtio: aio handler API, Christian Borntraeger, 2016/04/07
- Re: [Qemu-devel] [PATCH v3 0/7] virtio: aio handler API, Christian Borntraeger, 2016/04/07