qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>, qemu-devel@nongnu.org
Cc: qemu-block@nongnu.org, Kevin Wolf <kwolf@redhat.com>,
	Max Reitz <mreitz@redhat.com>,
	nbd-general list <nbd-general@lists.sourceforge.net>
Subject: Re: [Qemu-devel] [PATCH v4 14/14] nbd: Implement NBD_CMD_WRITE_ZEROES on client
Date: Mon, 27 Jun 2016 07:00:49 -0600	[thread overview]
Message-ID: <57712381.70708@redhat.com> (raw)
In-Reply-To: <0c3def31-ff22-7d42-c0ff-37e74a7e39e0@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1834 bytes --]

On 06/27/2016 06:13 AM, Paolo Bonzini wrote:
> 
> 
> 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 = NBD_MAX_BUFFER_SIZE;
>> +    bs->bl.max_pwrite_zeroes = NBD_MAX_BUFFER_SIZE;
> 
> 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.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

      reply	other threads:[~2016-06-27 13:00 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-25 22:15 [Qemu-devel] [PATCH v4 00/14] nbd: efficient write zeroes Eric Blake
2016-06-25 22:15 ` [Qemu-devel] [PATCH v4 01/14] nbd: Fix bad flag detection on server Eric Blake
2016-06-25 22:15 ` [Qemu-devel] [PATCH v4 02/14] nbd: Add qemu-nbd -D for human-readable description Eric Blake
2016-06-25 22:15 ` [Qemu-devel] [PATCH v4 03/14] nbd: Limit nbdflags to 16 bits Eric Blake
2016-06-25 22:15 ` [Qemu-devel] [PATCH v4 04/14] nbd: Treat flags vs. command type as separate fields Eric Blake
2016-06-25 22:15 ` [Qemu-devel] [PATCH v4 05/14] nbd: Share common reply-sending code in server Eric Blake
2016-06-25 22:15 ` [Qemu-devel] [PATCH v4 06/14] nbd: Send message along with server NBD_REP_ERR errors Eric Blake
2016-06-27 12:02   ` Paolo Bonzini
2016-06-25 22:15 ` [Qemu-devel] [PATCH v4 07/14] nbd: Share common option-sending code in client Eric Blake
2016-06-25 22:15 ` [Qemu-devel] [PATCH v4 08/14] nbd: Let server know when client gives up negotiation Eric Blake
2016-06-25 22:15 ` [Qemu-devel] [PATCH v4 09/14] nbd: Let client skip portions of server reply Eric Blake
2016-06-25 22:15 ` [Qemu-devel] [PATCH v4 10/14] nbd: Less allocation during NBD_OPT_LIST Eric Blake
2016-06-27 12:16   ` Paolo Bonzini
2016-07-18 23:31     ` Eric Blake
2016-06-25 22:15 ` [Qemu-devel] [PATCH v4 11/14] nbd: Support shorter handshake Eric Blake
2016-06-25 22:15 ` [Qemu-devel] [PATCH v4 12/14] nbd: Improve server handling of shutdown requests Eric Blake
2016-06-25 22:15 ` [Qemu-devel] [PATCH v4 13/14] nbd: Implement NBD_CMD_WRITE_ZEROES on server Eric Blake
2016-06-25 22:15 ` [Qemu-devel] [PATCH v4 14/14] nbd: Implement NBD_CMD_WRITE_ZEROES on client Eric Blake
2016-06-27 12:13   ` Paolo Bonzini
2016-06-27 13:00     ` Eric Blake [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=57712381.70708@redhat.com \
    --to=eblake@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=nbd-general@lists.sourceforge.net \
    --cc=pbonzini@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).