From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58729) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHW9p-0006PR-8a for qemu-devel@nongnu.org; Mon, 27 Jun 2016 09:00:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bHW9o-0007um-7J for qemu-devel@nongnu.org; Mon, 27 Jun 2016 09:00:57 -0400 References: <1466892954-8684-1-git-send-email-eblake@redhat.com> <1466892954-8684-15-git-send-email-eblake@redhat.com> <0c3def31-ff22-7d42-c0ff-37e74a7e39e0@redhat.com> From: Eric Blake Message-ID: <57712381.70708@redhat.com> Date: Mon, 27 Jun 2016 07:00:49 -0600 MIME-Version: 1.0 In-Reply-To: <0c3def31-ff22-7d42-c0ff-37e74a7e39e0@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="OeplWkRMEEEtonlmV2MJae5wfXfFOUHBu" Subject: Re: [Qemu-devel] [PATCH v4 14/14] nbd: Implement NBD_CMD_WRITE_ZEROES on client List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Kevin Wolf , Max Reitz , nbd-general list This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --OeplWkRMEEEtonlmV2MJae5wfXfFOUHBu From: Eric Blake To: Paolo Bonzini , qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Kevin Wolf , Max Reitz , nbd-general list Message-ID: <57712381.70708@redhat.com> Subject: Re: [PATCH v4 14/14] nbd: Implement NBD_CMD_WRITE_ZEROES on client References: <1466892954-8684-1-git-send-email-eblake@redhat.com> <1466892954-8684-15-git-send-email-eblake@redhat.com> <0c3def31-ff22-7d42-c0ff-37e74a7e39e0@redhat.com> In-Reply-To: <0c3def31-ff22-7d42-c0ff-37e74a7e39e0@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 06/27/2016 06:13 AM, Paolo Bonzini wrote: >=20 >=20 > On 26/06/2016 00:15, Eric Blake wrote: >> diff --git a/block/nbd.c b/block/nbd.c >> index 8d57220..049d1bd 100644 >> --- a/block/nbd.c >> +++ b/block/nbd.c >> @@ -357,6 +357,7 @@ static int nbd_co_flush(BlockDriverState *bs) >> static void nbd_refresh_limits(BlockDriverState *bs, Error **errp) >> { >> bs->bl.max_pdiscard =3D NBD_MAX_BUFFER_SIZE; >> + bs->bl.max_pwrite_zeroes =3D NBD_MAX_BUFFER_SIZE; >=20 > I have probably asked before---is there any reason for these to be > limited, since the commands have no payload? Here's the last time it was brought up on the nbd-general list [1]. We have the potential BLOCK_SIZE handshake negotiation extension, where I was proposing that the server can advertise its actual limits (rather than the client having to guess them or rely on out-of-band information) - and I was proposing that NBD_CMD_TRIM and NBD_CMD_WRITE_ZEROES should be permitted to advertise additional limits that are larger than the NBD_CMD_WRITE limit, precisely because they don't carry a payload and can therefore be more efficient if done in bulk. [1] https://sourceforge.net/p/nbd/mailman/message/35081223/ But at the time of that thread, there was concern expressed whether adding and additional NBD_INFO for each NBD_CMD limit would scale well, or whether we need a different approach, and I haven't revisited the thread since that comment. At any rate, I have BLOCK_SIZE patches ready for qemu, once the WRITE_ZERO patches land, and where it should be easy to make this limit runtime-settable to a larger value from actual server limits, if we can decide how BLOCK_SIZE should advertise such a limit. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --OeplWkRMEEEtonlmV2MJae5wfXfFOUHBu 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/ iQEcBAEBCAAGBQJXcSOBAAoJEKeha0olJ0Nq604H/33GQbHfZXdwfNVe7qTRa8hs lPx3p8MhNBi7RAOS7TQ4GrLCwcrC+a4s0AVz8r9gqF/enYsE33q/s8cinaH0/MDZ uELFeSPJZYxX4GYfOA7EzcuujyYX1IsqwldNN7Pw2VNPRh4dq+nd8vwccb6RLHWt nMY3Zr/uNPJ0JIvpAA3XQv0YdDKapw/49pk1ugmE/aN6vpTVYmyHbgHH0PV2wIAc deF20UCYg9K28d6cxKASs+DHvL9CUCAAEr+QYi2U++KsHA0Yp+lGf8/Ad6SlY6nO xND461gVwCZvKzyzjeZ7iAmJpC7oKaON55XKt6zGane0zA6FgIVjFPTIwUBq5LU= =l9CU -----END PGP SIGNATURE----- --OeplWkRMEEEtonlmV2MJae5wfXfFOUHBu--