From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:49026) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SuW58-0004V5-I6 for qemu-devel@nongnu.org; Thu, 26 Jul 2012 17:58:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SuW57-0007gb-FF for qemu-devel@nongnu.org; Thu, 26 Jul 2012 17:58:54 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49959) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SuW57-0007gX-5Z for qemu-devel@nongnu.org; Thu, 26 Jul 2012 17:58:53 -0400 Message-ID: <5011BD75.40605@redhat.com> Date: Thu, 26 Jul 2012 15:58:13 -0600 From: Eric Blake MIME-Version: 1.0 References: <1343227834-5400-1-git-send-email-owasserm@redhat.com> <1343227834-5400-8-git-send-email-owasserm@redhat.com> In-Reply-To: <1343227834-5400-8-git-send-email-owasserm@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enigA247602D15ADB11618CD0EE0" Subject: Re: [Qemu-devel] [PATCH 06/11] Add xbzrle_encode_buffer and xbzrle_decode_buffer functions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Orit Wasserman 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, Petter Svard , Benoit Hudzia , avi@redhat.com, Aidan Shribman , pbonzini@redhat.com, lcapitulino@redhat.com, chegu_vinod@hp.com This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigA247602D15ADB11618CD0EE0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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) te= st > to find out if any byte in the long word is zero. >=20 > Signed-off-by: Benoit Hudzia > Signed-off-by: Petter Svard > Signed-off-by: Aidan Shribman > Signed-off-by: Orit Wasserman > Signed-off-by: Eric Blake > --- > +int xbzrle_decode_buffer(uint8_t *src, int slen, uint8_t *dst, int dle= n) > + > + memcpy(dst + d , src + i, count); I think coding style prefers no space before ','. But if the patch checker didn't warn... --=20 Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enigA247602D15ADB11618CD0EE0 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJQEb11AAoJEKeha0olJ0NqahMH/ioyWno9nUsbeiR0VEZaT1Cl zfjeHS0LZC0PHkoPQWYnAknkOG7I5R03Sl+AM3plqmMqzz6ZJzrF6efauaC5lagq /fhlFci78KYDssOA2DvGdY4H4dzkMSIOW4zDb0yoNzBFbQcrlyjwgegDt+iBZCP4 CfaVYMotneegyYXB07NCKxkjCT1fiRnEA0Z5mv6k5xjfrkRwf/0BVH9gRixUQqHg aKTqWs06urUTU+eFVBhlLuZh8c4ZcD3rCTZwq7vZlG0v+ia7sKdXSGdI+9POWml/ 65VPXgHsczIo0/oieinmbfVqN+6x2SkMoYku7BFRiRbY/UZtsD1FYRYmbUhW3Eo= =hyqV -----END PGP SIGNATURE----- --------------enigA247602D15ADB11618CD0EE0--