From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50671) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WjwqI-0005pJ-A2 for qemu-devel@nongnu.org; Mon, 12 May 2014 16:29:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WjwqD-0006vZ-TU for qemu-devel@nongnu.org; Mon, 12 May 2014 16:28:58 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49139) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WjwqD-0006vP-MU for qemu-devel@nongnu.org; Mon, 12 May 2014 16:28:53 -0400 Message-ID: <53712EFC.5080108@redhat.com> Date: Mon, 12 May 2014 14:28:44 -0600 From: Eric Blake MIME-Version: 1.0 References: <1399566139-24140-1-git-send-email-pl@kamp.de> In-Reply-To: <1399566139-24140-1-git-send-email-pl@kamp.de> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="9q15uWu8axpi9NDobvLR2ttE4rW4FnVxJ" Subject: Re: [Qemu-devel] [PATCHv4] block: optimize zero writes with bdrv_write_zeroes List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Lieven , qemu-devel@nongnu.org Cc: kwolf@redhat.com, pbonzini@redhat.com, famz@redhat.com, stefanha@redhat.com, mreitz@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --9q15uWu8axpi9NDobvLR2ttE4rW4FnVxJ Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 05/08/2014 10:22 AM, Peter Lieven wrote: > this patch tries to optimize zero write requests > by automatically using bdrv_write_zeroes if it is > supported by the format. >=20 > This significantly speeds up file system initialization and > should speed zero write test used to test backend storage > performance. >=20 > Signed-off-by: Peter Lieven > --- > v3->v4: - use QAPI generated enum and lookup table [Kevin] > - added more details about the options in the comments > of the qapi-schema [Eric] > - changed the type of detect_zeroes from str to > BlockdevDetectZeroesOptions. I left the name > as is because it is consistent with e.g. > BlockdevDiscardOptions or BlockdevAioOptions [Eric] > - changed the parse function in blockdev_init to > be generic usable for other enum parameters If you wouldn't mind, I think the generic function is useful enough that people might want to backport it independently from this optimization. It would be better to split this into a two-patch series, one for the new parse_enum_option, the other for bdrv_write_zeroes utilizing it. > + },{ > + .name =3D "detect-zeroes", > + .type =3D QEMU_OPT_STRING, > + .help =3D "try to optimize zero writes", Might be worth listing (off, on, unmap) in the text. Everything else looked okay, but I'll wait for R-b until I see a response about the idea of splitting the patch (even if that response is justification for keeping it as one) --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --9q15uWu8axpi9NDobvLR2ttE4rW4FnVxJ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJTcS78AAoJEKeha0olJ0NqtG0H/j9s62cHW232ljfDUVIFMcM4 l0teMwi20Mi47+fF8i2qViYIu48bFXVIwU7/5VntecxZr4Sz+g4znyfpf7rWxCm7 Zl+2kaKsqJF2zEPjPxnO5k619xjyy1cPGUYfLNxbOOSo7OwFgTVsNAKh672znQu1 Xek4fI1zmKqtii8fd0IDRT2hIrawTjPVt3ggSwPo6UgGa6aHQVBHlaWaGEx5e1vn yKN6oU9JzGgq8bTc1vxb4zHxjMiZue/MoQpH6mllLQe1SR+UQrZF4vvu01kRLg8C JvmhwUcDHfdO9BtMHq4GGnx1ra24KKJaBY/+J3XTFGAcKpDxGc1xTp0DYExIhAo= =B5fA -----END PGP SIGNATURE----- --9q15uWu8axpi9NDobvLR2ttE4rW4FnVxJ--