From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42159) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDjvl-0001gn-5N for qemu-devel@nongnu.org; Thu, 16 Jun 2016 22:54:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bDjvj-0003TZ-3L for qemu-devel@nongnu.org; Thu, 16 Jun 2016 22:54:48 -0400 References: <1465917916-22348-1-git-send-email-den@openvz.org> <1465917916-22348-6-git-send-email-den@openvz.org> <5760C98F.4010600@redhat.com> <20160615091943.GA26488@stefanha-x1.localdomain> <57612FDE.2090304@virtuozzo.com> <20160616101046.GE31974@stefanha-x1.localdomain> From: Eric Blake Message-ID: <57636618.6030403@redhat.com> Date: Thu, 16 Jun 2016 20:53:12 -0600 MIME-Version: 1.0 In-Reply-To: <20160616101046.GE31974@stefanha-x1.localdomain> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="9Hjpmkt4DtdHP8cvuKAkUA61HJ0oufSAU" Subject: Re: [Qemu-devel] [PATCH 5/9] mirror: improve performance of mirroring of empty disk List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi , "Denis V. Lunev" Cc: Stefan Hajnoczi , Kevin Wolf , vsementsov@virtuozzo.com, Fam Zheng , qemu-block@nongnu.org, Jeff Cody , qemu-devel@nongnu.org, Max Reitz , "Denis V. Lunev" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --9Hjpmkt4DtdHP8cvuKAkUA61HJ0oufSAU Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 06/16/2016 04:10 AM, Stefan Hajnoczi wrote: >=20 > io_sectors currently only accounts for bytes written, not bytes read. >=20 > Therefore, I think we need: >=20 > /* Don't charge for efficient zero writes */ > if (drv->bdrv_co_pwrite_zeroes) { > io_sectors =3D 0; > } That's not sufficient. NBD will have conditional support for write zeroes, depending on whether the server supports it (that is, once my patches for NBD_CMD_WRITE_ZEROES get out of a holding pattern on all the other patches in the queue being flushed...). So NBD will have the bdrv_co_pwrite_zeroes callback, but that doesn't mean it will always work - if the server doesn't support it, calling bdrv_co_pwrite_zeroes will fail with -ENOTSUP and fall back to less-efficient writes that need to be accounted for. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --9Hjpmkt4DtdHP8cvuKAkUA61HJ0oufSAU Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJXY2YZAAoJEKeha0olJ0NqsiwIAJtKfPpTOUPKeUCsshrPvKlW S+BFjLbiD1z7DfIQdwbJgF6EZ+2MB52rFZSxAAecsASC6rmbLGhOeI+Cu9rIlNz5 4wXhe0AVMkxGKneC8KBnD/WDWMRzVZ6CJvlaVmMYjjFpJubUibJ+Y4npxMMJpdTE Uo10coLXu1GEv2Q4QOcF0L79TwGbgJ3vZIX3Vu7fmMwlaOiAjvwAsSQXmiNLH34E tXljvmiRRIf9ViRb63BD7GOYbIzqTFshjSWo99zLIdBWCg+3I7XLTUIr7ovOTQaW uNK1oLRkSH/sqdBekqjgr7jMaasQDmFaxuizbA2jbTqCvNItYmJEKYdGOqq0RmY= =hmeq -----END PGP SIGNATURE----- --9Hjpmkt4DtdHP8cvuKAkUA61HJ0oufSAU--