From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54596) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c7gwi-0000Px-71 for qemu-devel@nongnu.org; Fri, 18 Nov 2016 06:03:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c7gwd-0007eu-BT for qemu-devel@nongnu.org; Fri, 18 Nov 2016 06:03:04 -0500 Received: from mail-wm0-x242.google.com ([2a00:1450:400c:c09::242]:36707) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c7gwd-0007e2-4Y for qemu-devel@nongnu.org; Fri, 18 Nov 2016 06:02:59 -0500 Received: by mail-wm0-x242.google.com with SMTP id m203so4944509wma.3 for ; Fri, 18 Nov 2016 03:02:58 -0800 (PST) Date: Fri, 18 Nov 2016 11:02:56 +0000 From: Stefan Hajnoczi Message-ID: <20161118110256.GF28853@stefanha-x1.localdomain> References: <1479333189-20082-1-git-send-email-stefanha@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Il7n/DHsA0sMLmDu" Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [PATCH 0/3] virtio: disable notifications in blk and scsi List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Christian Borntraeger Cc: Stefan Hajnoczi , qemu-devel@nongnu.org, Kevin Wolf , Paolo Bonzini , zhunxun@gmail.com, Fam Zheng , "Michael S. Tsirkin" --Il7n/DHsA0sMLmDu Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Nov 17, 2016 at 12:01:30PM +0100, Christian Borntraeger wrote: > On 11/16/2016 10:53 PM, Stefan Hajnoczi wrote: > > Disabling notifications during virtqueue processing reduces the number = of > > exits. The virtio-net device already uses virtio_queue_set_notificatio= ns() but > > virtio-blk and virtio-scsi do not. > >=20 > > The following benchmark shows a 15% reduction in virtio-blk-pci MMIO ex= its: > >=20 > > (host)$ qemu-system-x86_64 \ > > -enable-kvm -m 1024 -cpu host \ > > -drive if=3Dvirtio,id=3Ddrive0,file=3Df24.img,format=3Dra= w,\ > > cache=3Dnone,aio=3Dnative > > (guest)$ fio # jobs=3D4, iodepth=3D8, direct=3D1, randread > > (host)$ sudo perf record -a -e kvm:kvm_fast_mmio > >=20 > > Number of kvm_fast_mmio events: > > Unpatched: 685k > > Patched: 592k (-15%, lower is better) > >=20 > > Note that a workload with iodepth=3D1 and a single thread will not bene= fit - this > > is a batching optimization. The effect should be strongest with large = iodepth > > and multiple threads submitting I/O. The guest I/O scheduler also affe= cts the > > optimization. >=20 > I have trouble seeing any difference in terms of performances or CPU load= (other than=20 > a reduced number of kicks). > I was expecting some benefit by reducing the spinlock hold times in virti= o-blk, > but this needs some more setups to actually find the sweet spot. Are you testing on s390 with ccw? I'm not familiar with the performance characteristics of the kick under ccw. > Maybe it will show its benefit with the polling thing? Yes, I hope it will benefit polling. I'll build patches for polling on top of this. --Il7n/DHsA0sMLmDu Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJYLt/gAAoJEJykq7OBq3PIwc0H/01g3LJOBfwPxA7xd4r75zyS Tts5XGWRN3R3O/skMNMQW+9nvJEeyXMvw/EAhC240piFf+OWvWSDNIS/vt9g7cz3 2COFBntVScF2T0FPU8lNYgJYmqw6sbkA9blqD3sj/IKlL91qjQY41PfVWVYs0dKA ePE0pGMBPKwlv43bMovwTefIyOB4cMZd4AjBxiXblM9J3mqnEsmcWR1j+Yvcajx+ gQvgp/8k5KNqGCf6vj3i6xCywa1he7GEe1CZmzn+pX/6eIZhSKAcMbDa+Lo7ZIer ONZDsNWyRTNOB8tEi3Un2zWTfIXMqla8k6HMnaE4X5EoxvBg2O5SzNGOtitzazA= =GxRV -----END PGP SIGNATURE----- --Il7n/DHsA0sMLmDu--