All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: qemu-devel@nongnu.org
Cc: qemu-block@nongnu.org, edgar.kaziakhmedov@virtuozzo.com,
	vsementsov@virtuozzo.com
Subject: [Qemu-devel] [PATCH 0/4] Support larger NBD_CMD_WRITE_ZEROES
Date: Tue,  1 May 2018 16:13:32 -0500	[thread overview]
Message-ID: <20180501211336.986372-1-eblake@redhat.com> (raw)

This is my counterproposal for:
https://lists.gnu.org/archive/html/qemu-devel/2018-02/msg02107.html
where Edgar pointed out that NBD write zero requests are rather
inefficient because the NBD spec was ambiguous on whether we could
exceed an advertised maximum request size even when the command
carries no payload, and so for maximum compatibility with unknown
NBD partners, we erred on the conservative side.

The NBD spec has since been improved to mention that a client can
try a larger WRITE_ZEROES if it is prepared to handle an EINVAL, and
that a server should not hang up on overlarge requests that did not
include a payload.  But in the process it was pointed out that even
better would be improving the spec to advertise both limits (the
READ/WRITE payload limit, and the larger TRIM/ZERO limit), as done
in this series.

With this in place, qemu as both NBD client and server can send
zero requests up to BDRV_REQUEST_MAX_BYTES (nearly 2G) in length,
rather than having to subdivide the request into 32M chunks.

This series is experimental until the NBD spec is actually modified
to document the feature added here; but that modification will be
easier now that I have a proof-of-concept implementation.

Eric Blake (4):
  nbd: Prepare for additional block sizing info
  nbd/client: Refactor in preparation for more limits
  nbd/client: Support requests of additional block sizing info
  nbd/server: Support requests of additional block sizing info

 include/block/nbd.h |   8 +++-
 block/nbd.c         |  15 +++++-
 nbd/client.c        | 135 +++++++++++++++++++++++++++++++++++++++++++++++-----
 nbd/common.c        |   4 ++
 nbd/server.c        |  30 ++++++++++++
 nbd/trace-events    |   4 ++
 6 files changed, 181 insertions(+), 15 deletions(-)

-- 
2.14.3

             reply	other threads:[~2018-05-01 21:13 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-01 21:13 Eric Blake [this message]
2018-05-01 21:13 ` [Qemu-devel] [PATCH 1/4] nbd: Prepare for additional block sizing info Eric Blake
2018-05-03  8:20   ` Vladimir Sementsov-Ogievskiy
2018-05-01 21:13 ` [Qemu-devel] [PATCH 2/4] nbd/client: Refactor in preparation for more limits Eric Blake
2018-05-03  8:29   ` Vladimir Sementsov-Ogievskiy
2018-05-01 21:13 ` [Qemu-devel] [PATCH 3/4] nbd/client: Support requests of additional block sizing info Eric Blake
2018-05-03  9:17   ` Vladimir Sementsov-Ogievskiy
2018-05-03 14:49     ` Eric Blake
2018-05-03 15:51       ` Vladimir Sementsov-Ogievskiy
2018-05-22 15:33   ` Vladimir Sementsov-Ogievskiy
2018-05-23 15:40     ` Eric Blake
2018-05-01 21:13 ` [Qemu-devel] [PATCH 4/4] nbd/server: " Eric Blake

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=20180501211336.986372-1-eblake@redhat.com \
    --to=eblake@redhat.com \
    --cc=edgar.kaziakhmedov@virtuozzo.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=vsementsov@virtuozzo.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.