From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54061) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b7Xnu-0006z8-Nr for qemu-devel@nongnu.org; Mon, 30 May 2016 20:45:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b7Xnr-0003Wq-J1 for qemu-devel@nongnu.org; Mon, 30 May 2016 20:45:06 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46855) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b7Xnr-0003Wf-Aw for qemu-devel@nongnu.org; Mon, 30 May 2016 20:45:03 -0400 Date: Mon, 30 May 2016 17:44:59 -0700 From: Stefan Hajnoczi Message-ID: <20160531004459.GA24884@stefanha-x1.localdomain> References: <1463787632-7241-1-git-send-email-stefanha@redhat.com> <57444E38.9000001@de.ibm.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="dDRMvlgZJXvWKvBx" Content-Disposition: inline In-Reply-To: <57444E38.9000001@de.ibm.com> Subject: Re: [Qemu-devel] [PATCH 0/9] virtio-blk: multiqueue support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Christian Borntraeger Cc: qemu-devel@nongnu.org, Kevin Wolf , Paolo Bonzini , Ming Lei , Fam Zheng --dDRMvlgZJXvWKvBx Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, May 24, 2016 at 02:51:04PM +0200, Christian Borntraeger wrote: > On 05/21/2016 01:40 AM, Stefan Hajnoczi wrote: > > The virtio_blk guest driver has supported multiple virtqueues since Lin= ux 3.17. > > This patch series adds multiple virtqueues to QEMU's virtio-blk emulated > > device. > >=20 > > Ming Lei sent patches previously but these were not merged. This series > > implements virtio-blk multiqueue for QEMU from scratch since the codeba= se has > > changed. Live migration support for s->rq was also missing from the pr= evious > > series and has been added. > >=20 > > It's important to note that QEMU's block layer does not support multiqu= eue yet. > > Therefore virtio-blk device processes all virtqueues in the same AioCon= text > > (IOThread). Further work is necessary to take advantage of multiqueue = support > > in QEMU's block layer once it becomes available. > >=20 > > I will post performance results once they are ready. > >=20 > > Stefan Hajnoczi (9): > > virtio-blk: use batch notify in non-dataplane case > > virtio-blk: tell dataplane which vq to notify > > virtio-blk: associate request with a virtqueue > > virtio-blk: add VirtIOBlockConf->num_queues > > virtio-blk: multiqueue batch notify > > vmstate: add VMSTATE_VARRAY_UINT32_ALLOC > > virtio-blk: live migrate s->rq with multiqueue > > virtio-blk: dataplane multiqueue support > > virtio-blk: add num-queues device property > >=20 > > hw/block/dataplane/virtio-blk.c | 68 +++++++------- > > hw/block/dataplane/virtio-blk.h | 2 +- > > hw/block/virtio-blk.c | 200 ++++++++++++++++++++++++++++++++= ++++---- > > include/hw/virtio/virtio-blk.h | 13 ++- > > include/migration/vmstate.h | 10 ++ > > 5 files changed, 241 insertions(+), 52 deletions(-) > >=20 >=20 > With 2.6 I see 2 host threads consuming a CPU when running fio in a singl= e CPU > guest with a null-blk device and iothread for that disk. (the vcpu thread= and > the iothread). With this patchset the main thread also consumes almost 80= % of a > CPU doing polling in main_loop_wait. I have not even changes the num-queu= es=20 > values. >=20 > So in essence 3 vs 2 host cpus. I see the performance regression as well. It is caused by Patch 1 and there is a simple explanation: I broke dataplane because the BH is in the main loop AioContext and not the dataplane AioContext. Thanks for spotting this, Christian! Stefan --dDRMvlgZJXvWKvBx Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJXTN6KAAoJEJykq7OBq3PIeGkIAJJO7RYzSCsEDkZsX3plVrZu NMuYKuAA/gQ7TBpG4q0J8cWg4BAPy1f2J0l98Vi+speUyyMzsVwApsE0+JssRQXv S0ryatmBsmEw9B4H5Vj9iCmUn+Ffbb8r9fc68xTDY/7Uvmqo/ZlU2xs62ldqEKUz +y/Yr2qO05zRa9t+pQjIHMGeaOeDHFUHADwA0c3g6cadjE75CaYkaAMKBszfg8WL Ht3+h7Xhfq4bnZrhi39n3fjpm9T2fdETCmtUqsPwJp1Posp/c1wOd2rZcu3/9cGN gqnBuaHskp6HS5ji/Co6xleqL/I33QWlR5sd2BZ2l1C2IAnZy0ogIkQWWCrOVcQ= =e+e+ -----END PGP SIGNATURE----- --dDRMvlgZJXvWKvBx--