[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 06/11] Add xbzrle_encode_buffer and xbzrle_decod
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH 06/11] Add xbzrle_encode_buffer and xbzrle_decode_buffer functions |
Date: |
Thu, 26 Jul 2012 15:58:13 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120717 Thunderbird/14.0 |
On 07/25/2012 08:50 AM, Orit Wasserman wrote:
> For performance we are encoding long word at a time.
> For nzrun we use long-word-at-a-time NULL-detection tricks from strcmp():
[Technically, 'NUL' is the byte with value 0x00, 'NULL' is the pointer
with typical value 0x00000000 or 0x0000000000000000, depending on
whether you are 32-bit or 64-bit. But it's not worth rewriting this
commit message just to delete an 'L']
> using ((lword - 0x0101010101010101) & (~lword) & 0x8080808080808080) test
> to find out if any byte in the long word is zero.
>
> Signed-off-by: Benoit Hudzia <address@hidden>
> Signed-off-by: Petter Svard <address@hidden>
> Signed-off-by: Aidan Shribman <address@hidden>
> Signed-off-by: Orit Wasserman <address@hidden>
> Signed-off-by: Eric Blake <address@hidden>
> ---
> +int xbzrle_decode_buffer(uint8_t *src, int slen, uint8_t *dst, int dlen)
> +
> + memcpy(dst + d , src + i, count);
I think coding style prefers no space before ','. But if the patch
checker didn't warn...
--
Eric Blake address@hidden +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH 00/11] Migration next v6, (continued)
- [Qemu-devel] [PATCH 00/11] Migration next v6, Orit Wasserman, 2012/07/25
- [Qemu-devel] [PATCH 11/11] Restart optimization on stage3 update version, Orit Wasserman, 2012/07/25
- [Qemu-devel] [PATCH 07/11] Add XBZRLE to ram_save_block and ram_save_live, Orit Wasserman, 2012/07/25
- [Qemu-devel] [PATCH 08/11] Add migrate_set_cachesize command, Orit Wasserman, 2012/07/25
- [Qemu-devel] [PATCH 06/11] Add xbzrle_encode_buffer and xbzrle_decode_buffer functions, Orit Wasserman, 2012/07/25
- Re: [Qemu-devel] [PATCH 06/11] Add xbzrle_encode_buffer and xbzrle_decode_buffer functions,
Eric Blake <=
- [Qemu-devel] [PATCH 10/11] Add XBZRLE statistics, Orit Wasserman, 2012/07/25
- [Qemu-devel] [PATCH 09/11] Add migration accounting for normal and duplicate pages, Orit Wasserman, 2012/07/25