qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Orit Wasserman <owasserm@redhat.com>
Cc: peter.maydell@linaro.org, aliguori@us.ibm.com,
	quintela@redhat.com, stefanha@gmail.com, qemu-devel@nongnu.org,
	mdroth@linux.vnet.ibm.com, blauwirbel@gmail.com, avi@redhat.com,
	pbonzini@redhat.com, chegu_vinod@hp.com
Subject: Re: [Qemu-devel] [PATCH v15 2/9] Add XBZRLE documentation
Date: Thu, 05 Jul 2012 07:24:20 -0600	[thread overview]
Message-ID: <4FF59584.4000303@redhat.com> (raw)
In-Reply-To: <1341492709-13897-3-git-send-email-owasserm@redhat.com>

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

On 07/05/2012 06:51 AM, Orit Wasserman wrote:
> Signed-off-by: Orit Wasserman <owasserm@redhat.com>
> ---
>  docs/xbzrle.txt |  136 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  1 files changed, 136 insertions(+), 0 deletions(-)
>  create mode 100644 docs/xbzrle.txt
> 

> +
> +Example
> +old buffer:
> +1001 zeros
> +05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 00 00 6b 00 6d
> +3074 zeros

This _still_ doesn't add up to 4096:

1001 + 20 + 3074 = 4095

> +
> +new buffer:
> +1001 zeros
> +01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 00 00 67 00 69
> +3704 zeros

Still a transposition error.

Also, this still has the flaw that it is too weak of an example - the
only unchanged bytes happen to also be zero bytes to begin with; it
would be much nicer if the example included at least one non-zero byte
that did not change between old and new.

> +
> +encoded buffer:
> +
> +encoded length 24
> +e9 07 0f 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 03 01 67 01 01 69
                                                         ^^
That says you have a zrun of 3 bytes, but the example only shows a zrun
of 2 bytes.

It feels like I'm pulling teeth to get a good example.  If you will just
squash in the following (hand-written) diff below, you will then have
4096 bytes in both old and new buffers, and your encoded buffer listing
a zrun of 3 will be correct, plus you will be demonstrating a non-zero
byte that remained unchanged.

@@ ???,??? @@
 Example
 old buffer:
 1001 zeros
-05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 00 00 6b 00 6d
+05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 68 00 00 6b 00 6d
 3074 zeros

 new buffer:
 1001 zeros
-01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 00 00 67 00 69
-3704 zeros
+01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 68 00 00 67 00 69
+3074 zeros

 encoded buffer:

-- 
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: 620 bytes --]

  reply	other threads:[~2012-07-05 13:25 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-05 12:51 [Qemu-devel] [PATCH v15 0/9] XBZRLE delta for live migration of large memory app Orit Wasserman
2012-07-05 12:51 ` [Qemu-devel] [PATCH v15 1/9] Add migration capabilities Orit Wasserman
2012-07-05 12:51 ` [Qemu-devel] [PATCH v15 2/9] Add XBZRLE documentation Orit Wasserman
2012-07-05 13:24   ` Eric Blake [this message]
2012-07-05 17:22     ` Orit Wasserman
2012-07-05 12:51 ` [Qemu-devel] [PATCH v15 3/9] Add cache handling functions Orit Wasserman
2012-07-05 12:51 ` [Qemu-devel] [PATCH v15 4/9] Add uleb encoding/decoding functions Orit Wasserman
2012-07-05 12:51 ` [Qemu-devel] [PATCH v15 5/9] Change ram_save_block to return -1 if there are no more changes Orit Wasserman
2012-07-05 12:51 ` [Qemu-devel] [PATCH v15 6/9] Add xbzrle_encode_buffer and xbzrle_decode_buffer functions Orit Wasserman
2012-07-05 13:55   ` Eric Blake
2012-07-05 18:01     ` Orit Wasserman
2012-07-05 12:51 ` [Qemu-devel] [PATCH v15 7/9] Add XBZRLE to ram_save_block and ram_save_live Orit Wasserman
2012-07-05 14:04   ` Eric Blake
2012-07-06  5:23     ` Orit Wasserman
2012-07-05 12:51 ` [Qemu-devel] [PATCH v15 8/9] Add set_cachesize command Orit Wasserman
2012-07-05 14:14   ` Eric Blake
2012-07-06  5:24     ` Orit Wasserman
2012-07-05 12:51 ` [Qemu-devel] [PATCH v15 9/9] Add XBZRLE statistics Orit Wasserman
2012-07-05 14:20   ` 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=4FF59584.4000303@redhat.com \
    --to=eblake@redhat.com \
    --cc=aliguori@us.ibm.com \
    --cc=avi@redhat.com \
    --cc=blauwirbel@gmail.com \
    --cc=chegu_vinod@hp.com \
    --cc=mdroth@linux.vnet.ibm.com \
    --cc=owasserm@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=stefanha@gmail.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 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).