From: Cornelia Huck <cornelia.huck@de.ibm.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: borntraeger@de.ibm.com, famz@redhat.com, qemu-devel@nongnu.org,
mst@redhat.com
Subject: Re: [Qemu-devel] [PATCH 6/9] virtio-blk: use aio handler for data plane
Date: Wed, 30 Mar 2016 17:25:56 +0200 [thread overview]
Message-ID: <20160330172556.68f41e2b.cornelia.huck@de.ibm.com> (raw)
In-Reply-To: <1459342088-24311-7-git-send-email-pbonzini@redhat.com>
On Wed, 30 Mar 2016 14:48:05 +0200
Paolo Bonzini <pbonzini@redhat.com> wrote:
> From: "Michael S. Tsirkin" <mst@redhat.com>
>
> 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: Michael S. Tsirkin <mst@redhat.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> hw/block/dataplane/virtio-blk.c | 13 +++++++++++++
> hw/block/virtio-blk.c | 27 +++++++++++++++++----------
> include/hw/virtio/virtio-blk.h | 2 ++
> 3 files changed, 32 insertions(+), 10 deletions(-)
>
> diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c
> index 77221c1..47ad9ed 100644
> --- a/hw/block/virtio-blk.c
> +++ b/hw/block/virtio-blk.c
> @@ -577,20 +577,11 @@ void virtio_blk_handle_request(VirtIOBlockReq *req, MultiReqBuffer *mrb)
> }
> }
>
> -static void virtio_blk_handle_output(VirtIODevice *vdev, VirtQueue *vq)
> +void virtio_blk_handle_vq(VirtIOBlock *s, VirtQueue *vq)
> {
> - VirtIOBlock *s = VIRTIO_BLK(vdev);
> VirtIOBlockReq *req;
> MultiReqBuffer mrb = {};
>
> - /* Some guests kick before setting VIRTIO_CONFIG_S_DRIVER_OK so start
> - * dataplane here instead of waiting for .set_status().
> - */
> - if (s->dataplane && !s->dataplane_started) {
> - virtio_blk_data_plane_start(s->dataplane);
> - return;
> - }
> -
> assert(atomic_fetch_inc(&s->reentrancy_test) == 0);
Hm, based on wrong branch?
> blk_io_plug(s->blk);
>
next prev parent reply other threads:[~2016-03-30 15:26 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-30 12:47 [Qemu-devel] [PATCH resend 0/9] virtio: aio handler API Paolo Bonzini
2016-03-30 12:48 ` [Qemu-devel] [PATCH 1/9] virtio-dataplane: pass assign=true to virtio_queue_aio_set_host_notifier_handler Paolo Bonzini
2016-03-30 13:23 ` Cornelia Huck
2016-03-30 13:30 ` Paolo Bonzini
2016-03-30 13:43 ` Cornelia Huck
2016-03-30 13:44 ` Cornelia Huck
2016-03-30 12:48 ` [Qemu-devel] [PATCH 2/9] virtio: make virtio_queue_notify_vq static Paolo Bonzini
2016-03-30 13:39 ` Cornelia Huck
2016-03-30 12:48 ` [Qemu-devel] [PATCH 3/9] virtio-blk: fix disabled mode Paolo Bonzini
2016-03-30 13:57 ` Cornelia Huck
2016-03-31 8:32 ` tu bo
2016-03-31 8:36 ` Paolo Bonzini
2016-03-30 12:48 ` [Qemu-devel] [PATCH 4/9] virtio-scsi: " Paolo Bonzini
2016-03-30 14:52 ` Cornelia Huck
2016-03-30 12:48 ` [Qemu-devel] [PATCH 5/9] virtio: add aio handler Paolo Bonzini
2016-03-30 14:55 ` Cornelia Huck
2016-03-30 15:09 ` Paolo Bonzini
2016-03-30 12:48 ` [Qemu-devel] [PATCH 6/9] virtio-blk: use aio handler for data plane Paolo Bonzini
2016-03-30 15:25 ` Cornelia Huck [this message]
2016-03-30 15:42 ` Paolo Bonzini
2016-03-30 12:48 ` [Qemu-devel] [PATCH 7/9] virtio-scsi: " Paolo Bonzini
2016-03-30 15:31 ` Cornelia Huck
2016-03-30 12:48 ` [Qemu-devel] [PATCH 8/9] virtio: merge virtio_queue_aio_set_host_notifier_handler with virtio_queue_set_aio Paolo Bonzini
2016-03-30 15:33 ` Cornelia Huck
2016-03-30 12:48 ` [Qemu-devel] [PATCH 9/9] virtio: remove starting/stopping checks Paolo Bonzini
2016-03-30 15:36 ` Cornelia Huck
-- strict thread matches above, loose matches on Subject: below --
2016-04-01 13:19 [Qemu-devel] [PATCH v2 0/9] virtio: aio handler API Paolo Bonzini
2016-04-01 13:19 ` [Qemu-devel] [PATCH 6/9] virtio-blk: use aio handler for data plane Paolo Bonzini
2016-04-01 14:05 ` Cornelia Huck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160330172556.68f41e2b.cornelia.huck@de.ibm.com \
--to=cornelia.huck@de.ibm.com \
--cc=borntraeger@de.ibm.com \
--cc=famz@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).