[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 7/9] virtio-scsi: use aio handler for data plane
From: |
Cornelia Huck |
Subject: |
Re: [Qemu-devel] [PATCH 7/9] virtio-scsi: use aio handler for data plane |
Date: |
Wed, 30 Mar 2016 17:31:45 +0200 |
On Wed, 30 Mar 2016 14:48:06 +0200
Paolo Bonzini <address@hidden> wrote:
> In addition to handling IO in vcpu thread and in io thread, dataplane
> introduces yet another mode: handling it by aio.
>
> This reuses the same handler as previous modes, which triggers races as
> these were not designed to be reentrant.
>
> Use a separate handler just for aio, and disable regular handlers when
> dataplane is active.
>
> Signed-off-by: Paolo Bonzini <address@hidden>
> ---
> hw/scsi/virtio-scsi-dataplane.c | 43 ++++++++++++++++++++++++---
> hw/scsi/virtio-scsi.c | 65
> ++++++++++++++++++++++++++++-------------
> include/hw/virtio/virtio-scsi.h | 6 ++--
> 3 files changed, 86 insertions(+), 28 deletions(-)
>
> +static int virtio_scsi_vring_init(VirtIOSCSI *s, VirtQueue *vq, int n,
> + void (*fn)(VirtIODevice *vdev, VirtQueue *vq))
This function has been sadly misnamed since dataplane does not set up
its own vrings anymore. Maybe it should be called
virtio_scsi_vq_notifier_init() or so.
> {
> BusState *qbus = BUS(qdev_get_parent_bus(DEVICE(s)));
> VirtioBusClass *k = VIRTIO_BUS_GET_CLASS(qbus);
Reviewed-by: Cornelia Huck <address@hidden>
- Re: [Qemu-devel] [PATCH 4/9] virtio-scsi: fix disabled mode, (continued)
- [Qemu-devel] [PATCH 5/9] virtio: add aio handler, Paolo Bonzini, 2016/03/30
- [Qemu-devel] [PATCH 2/9] virtio: make virtio_queue_notify_vq static, Paolo Bonzini, 2016/03/30
- [Qemu-devel] [PATCH 6/9] virtio-blk: use aio handler for data plane, Paolo Bonzini, 2016/03/30
- [Qemu-devel] [PATCH 7/9] virtio-scsi: use aio handler for data plane, Paolo Bonzini, 2016/03/30
- Re: [Qemu-devel] [PATCH 7/9] virtio-scsi: use aio handler for data plane,
Cornelia Huck <=
- [Qemu-devel] [PATCH 8/9] virtio: merge virtio_queue_aio_set_host_notifier_handler with virtio_queue_set_aio, Paolo Bonzini, 2016/03/30
- [Qemu-devel] [PATCH 9/9] virtio: remove starting/stopping checks, Paolo Bonzini, 2016/03/30