From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46218) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X2gGh-0001ef-Vp for qemu-devel@nongnu.org; Thu, 03 Jul 2014 08:37:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X2gGZ-00061f-GE for qemu-devel@nongnu.org; Thu, 03 Jul 2014 08:37:39 -0400 Received: from mail-wg0-f51.google.com ([74.125.82.51]:50275) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X2gGZ-00061X-At for qemu-devel@nongnu.org; Thu, 03 Jul 2014 08:37:31 -0400 Received: by mail-wg0-f51.google.com with SMTP id x12so154596wgg.10 for ; Thu, 03 Jul 2014 05:37:23 -0700 (PDT) Date: Thu, 3 Jul 2014 14:37:20 +0200 From: Stefan Hajnoczi Message-ID: <20140703123720.GE28032@stefanha-thinkpad.redhat.com> References: <1404303528-7115-1-git-send-email-ming.lei@canonical.com> <1404303528-7115-4-git-send-email-ming.lei@canonical.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="RpqchZ26BWispMcB" Content-Disposition: inline In-Reply-To: <1404303528-7115-4-git-send-email-ming.lei@canonical.com> Subject: Re: [Qemu-devel] [PATCH v4 3/3] dataplane: submit I/O as a batch List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Ming Lei Cc: Kevin Wolf , Peter Maydell , Fam Zheng , "Michael S. Tsirkin" , qemu-devel@nongnu.org, Stefan Hajnoczi , Paolo Bonzini --RpqchZ26BWispMcB Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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, Vir= tQueueElement *elem, > req->elem =3D elem; > req->inhdr =3D inhdr; > =20 > + /* flush IOs queued first */ > + bdrv_flush_io_queue(s->blk->conf.bs); > + > bdrv_aio_flush(s->blk->conf.bs, complete_flush, req); > } > =20 > @@ -289,6 +292,7 @@ static void handle_notify(EventNotifier *e) > int ret; > =20 > 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 --RpqchZ26BWispMcB Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJTtU6AAAoJEJykq7OBq3PIAWsIAIJN0d9HJjkal6a0+WOvFhx9 9EqTESGpDnBSYXztdNr6a2V1+6G53UBdbsL3whSR7gCyq8j99KVe8ZEFopf4Hhkm KPad3ExuqJ6JzlFvZ2FtxvbSXHVXPOhixtzH1V87N5/E+yjBcm8rMzX4oZ5XBqh0 nfIXUcgRehFj5PdjveoVEKNyhXKUYbOSFVBdjYAdNODtoKxYm5wYMsYViEXszT0B Ys4FdbH0ehyXtXRz31zmKaoq11rIsiU3vBiielS3AFelV/3T+KrJCZFCUMXo30N3 jQEkB9cBfMTz4Ax1PybGjV3gn4vOejLsfXIC4An3fHODmJWR3zzlqRiJ728awuM= =XrKN -----END PGP SIGNATURE----- --RpqchZ26BWispMcB--