qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 4/7] virtio: add aio handler


From: Cornelia Huck
Subject: Re: [Qemu-devel] [PATCH 4/7] virtio: add aio handler
Date: Wed, 6 Apr 2016 15:42:17 +0200

On Wed, 6 Apr 2016 14:09:12 +0200
Paolo Bonzini <address@hidden> wrote:

> 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.

Actually, the code is not quite right until the next two patches have
been applied, but I think we can live with that.

> Patch 7 makes things clearer.

That as well.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]