qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v4 3/3] dataplane: submit I/O as a batch


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH v4 3/3] dataplane: submit I/O as a batch
Date: Thu, 3 Jul 2014 14:37:20 +0200
User-agent: Mutt/1.5.23 (2014-03-12)

On Wed, Jul 02, 2014 at 08:18:48PM +0800, Ming Lei wrote:
> diff --git a/hw/block/dataplane/virtio-blk.c b/hw/block/dataplane/virtio-blk.c
> index c10b7b7..82bb276 100644
> --- a/hw/block/dataplane/virtio-blk.c
> +++ b/hw/block/dataplane/virtio-blk.c
> @@ -201,6 +201,9 @@ static void do_flush_cmd(VirtIOBlockDataPlane *s, 
> VirtQueueElement *elem,
>      req->elem = elem;
>      req->inhdr = inhdr;
>  
> +    /* flush IOs queued first */
> +    bdrv_flush_io_queue(s->blk->conf.bs);
> +
>      bdrv_aio_flush(s->blk->conf.bs, complete_flush, req);
>  }
>  
> @@ -289,6 +292,7 @@ static void handle_notify(EventNotifier *e)
>      int ret;
>  
>      event_notifier_test_and_clear(&s->host_notifier);
> +    bdrv_io_plug(s->blk->conf.bs);
>      for (;;) {
>          /* Disable guest->host notifies to avoid unnecessary vmexits */
>          vring_disable_notification(s->vdev, &s->vring);
> @@ -322,6 +326,7 @@ static void handle_notify(EventNotifier *e)
>              break;
>          }
>      }
> +    bdrv_io_unplug(s->blk->conf.bs);
>  }

Might as well do the same for non-dataplane in hw/block/virtio-blk.c?

Stefan

Attachment: pgpuuzyDmQUD_.pgp
Description: PGP signature


reply via email to

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