From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:58690) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Smmfb-0000bP-O7 for qemu-devel@nongnu.org; Thu, 05 Jul 2012 10:04:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SmmfV-0002qT-AG for qemu-devel@nongnu.org; Thu, 05 Jul 2012 10:04:35 -0400 Received: from mx1.redhat.com ([209.132.183.28]:62368) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SmmfV-0002q5-1V for qemu-devel@nongnu.org; Thu, 05 Jul 2012 10:04:29 -0400 Message-ID: <4FF59EE3.5030200@redhat.com> Date: Thu, 05 Jul 2012 08:04:19 -0600 From: Eric Blake MIME-Version: 1.0 References: <1341492709-13897-1-git-send-email-owasserm@redhat.com> <1341492709-13897-8-git-send-email-owasserm@redhat.com> In-Reply-To: <1341492709-13897-8-git-send-email-owasserm@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig7DF81763CB22E89A7045B214" Subject: Re: [Qemu-devel] [PATCH v15 7/9] Add XBZRLE to ram_save_block and ram_save_live 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, chegu_vinod@hp.com This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig7DF81763CB22E89A7045B214 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 07/05/2012 06:51 AM, Orit Wasserman wrote: > In the outgoing migration check to see if the page is cached and > changed than send compressed page by using save_xbrle_page function. > In the incoming migration check to see if RAM_SAVE_FLAG_XBRLE is set > and decompress the page (by using load_xbrle function). >=20 > Signed-off-by: Benoit Hudzia > Signed-off-by: Petter Svard > Signed-off-by: Aidan Shribman > Signed-off-by: Orit Wasserman > --- > +static int save_xbzrle_page(QEMUFile *f, uint8_t *current_data, > + ram_addr_t current_addr, RAMBlock *block, > + ram_addr_t offset, int cont, int stage) > +{ > + int encoded_len =3D 0, bytes_sent =3D -1, ret =3D -1; > + XBZRLEHeader hdr =3D { > + .xh_len =3D 0, > + .xh_flags =3D 0, > + }; > + uint8_t *prev_cached_page; > + > + /* Stage 1 cache the page and exit. > + Stage 2 check to see if page is cached , if not cache the page.= No space before comma in English comments: s/ ,/,/ > + /* XBZRLE encoding (if there is no overflow) */ > + encoded_len =3D xbzrle_encode_buffer(prev_cached_page, current_dat= a, > + TARGET_PAGE_SIZE, XBZRLE.encode= d_buf, > + TARGET_PAGE_SIZE); > + if (encoded_len =3D=3D 0) { > + DPRINTF("Unmodifed page skipping\n"); s/Unmodifed/Unmodified/ I mentioned in my v13 review changing this to: s/Unmodifed page skipping/Skipping unmodified page/ it looks like you didn't pick up my v13 comments yet (and my fault for not complaining at v14). As a result, I stopped reviewing here. --=20 Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enig7DF81763CB22E89A7045B214 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/ iQEcBAEBCAAGBQJP9Z7jAAoJEKeha0olJ0NqbgQH/jd+04zPYOpYX0yhcrg8w1SI NWQPMl9EMhVj26u4ybINDFs59427ghE/Ey/7yjE0dyl3Dso87Dz3oZ4GeJ4TBACX 1CVIGqMhpPWJJojsQjhtVMGB3zyY8zYZpXHO3wt+xmwwu/FSxqfINE225BrP1f3T vNai4uh3HzikC9Q54KAmGhMZ1X7abRnS5NjkU/+USDvj7XwTCfZUI0az5jgS9j/t IIG57QYOja/dHj0GjMp3GWjsQdH2zsu5+EjiUhMqJzHh3pdHDnK84KMV36pJiUZO Zp9jJ++knMw33kOeVIY+mMSzedcY5sBRocJPRtS6vx2FHByUvCaEFUj+6Dbe2v8= =9HGM -----END PGP SIGNATURE----- --------------enig7DF81763CB22E89A7045B214--