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 13:11:17 +0200

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

> From: "Michael S. Tsirkin" <address@hidden>
> 
> In addition to handling IO in vcpu thread and in io thread, blk dataplane
> introduces yet another mode: handling it by AioContext.
> 
> Currently, this reuses the same handler as previous modes,
> which triggers races as these were not designed to be reentrant.
> Add instead a separate handler just for aio; this will make
> it possible to disable regular handlers when dataplane is active.
> 
> Signed-off-by: Michael S. Tsirkin <address@hidden>
> Signed-off-by: Paolo Bonzini <address@hidden>
> ---
>  hw/virtio/virtio.c         | 36 ++++++++++++++++++++++++++++++++----
>  include/hw/virtio/virtio.h |  3 +++
>  2 files changed, 35 insertions(+), 4 deletions(-)
> 

> +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?




reply via email to

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