Received: from eggs.gnu.org ([2001:4830:134:3::10]:47603) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bEwWy-0003Ff-3D for qemu-devel@nongnu.org; Mon, 20 Jun 2016 06:34:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bEwWx-0004Xq-2o for qemu-devel@nongnu.org; Mon, 20 Jun 2016 06:34:11 -0400 Date: Mon, 20 Jun 2016 11:34:02 +0100 From: Stefan Hajnoczi Message-ID: <20160620103402.GD3314@stefanha-x1.localdomain> References: <1465989402-18890-1-git-send-email-kwolf@redhat.com> <20160617101330.GE6994@stefanha-x1.localdomain> <20160617102411.GD5431@noname.redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Km1U/tdNT/EmXiR1" Content-Disposition: inline In-Reply-To: <20160617102411.GD5431@noname.redhat.com> Subject: Re: [Qemu-devel] [Qemu-block] [PATCH] linux-aio: Cancel BH if not needed List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: Stefan Hajnoczi , qemu-block@nongnu.org, pbonzini@redhat.com, qemu-devel@nongnu.org --Km1U/tdNT/EmXiR1 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jun 17, 2016 at 12:24:11PM +0200, Kevin Wolf wrote: > Am 17.06.2016 um 12:13 hat Stefan Hajnoczi geschrieben: > > On Wed, Jun 15, 2016 at 01:16:42PM +0200, Kevin Wolf wrote: > > > linux-aio uses a BH in order to make sure that the remaining completi= ons > > > are processed even in nested event loops of completion callbacks in > > > order to avoid deadlocks. > > >=20 > > > There is no need, however, to have the BH overhead for the first call > > > into qemu_laio_completion_bh() or after all pending completions have > > > already been processed. Therefore, this patch calls directly into > > > qemu_laio_completion_bh() in qemu_laio_completion_cb() and cancels > > > the BH after qemu_laio_completion_bh() has processed all pending > > > completions. > > >=20 > > > Signed-off-by: Kevin Wolf > > > --- > > > block/linux-aio.c | 4 +++- > > > 1 file changed, 3 insertions(+), 1 deletion(-) > >=20 > > I ran 4 x iodepth=3D16 random 4KB read I/O benchmarks. There might be = an > > improvement but it's within the error margin. My benchmarking setup can > > be noisy... > >=20 > > Anyway, this patch doesn't hurt performance. Guest and host are RHEL 7= =2E2. >=20 > Thanks for confirming! >=20 > > $ ./analyze.py runs/ > > Name IOPS Error > > linux-aio-bh-optimizations-ccb9dc1 12942616.0 =B1 16.83% > > linux-aio-bh-optimizations-ccb9dc1-2 13833110.4 =B1 4.74% > > linux-aio-bh-optimizations-off-23b0d9f 13303981.4 =B1 2.21% >=20 > What are these three commits? Is the first one with your virtio-blk > changes and this patch, the second only this patch and the third one > the baseline? The git trees are from qemu.git/master with no out-of-tree patches (my stuff isn't there). 1. linux-aio-bh-optimizations-ccb9dc1 12942616.0 =B1 16.83% This is your "linux-aio: Cancel BH if not needed" in qemu.git/master. 2. linux-aio-bh-optimizations-ccb9dc1-2 13833110.4 =B1 4.74% I wanted to try again because the 16.83% error margin is very high and probably due to noise. This is just a re-run of #1. 3. linux-aio-bh-optimizations-off-23b0d9f 13303981.4 =B1 2.21% This is the commit before your "linux-aio: Cancel BH if not needed" (ccb9dc1^ =3D=3D 23b0d9f). --Km1U/tdNT/EmXiR1 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJXZ8aaAAoJEJykq7OBq3PINvUH/ijtS6wM/KONDHQBNb1KMUnZ gcY5PntJUck/YN3DAsngL5BcqKN8TjiLRX32pHf85JgMsOeaHULYqI/TpZx7dW3k hbW7kzUvS6d4LEiCbWkE6cT2UfDYFLfPDL46ur7Abi6jc0/Rzhg6I8E7fdG2a0oA 68/nOKRELQOE/XT9l/kZQ5vK4mp0xQUJE1rX/KegGM6U9k3WIxwFfuUvENrnoHny 0t1VLI+la/cLfa8BSREXW77lmWBjYyBYgpvT5+MGYCG4m+8LAVyE1uA28pL5FFlA Hl0Eyo4MgscCQlXNZOiPd5hykvZms7fQCrewrM2kdrhqu3I8fvagceCuW6IiPS8= =BejJ -----END PGP SIGNATURE----- --Km1U/tdNT/EmXiR1--