From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:32932) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sn10v-0004oM-Fe for qemu-devel@nongnu.org; Fri, 06 Jul 2012 01:23:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sn10s-000670-D3 for qemu-devel@nongnu.org; Fri, 06 Jul 2012 01:23:33 -0400 Received: from mx1.redhat.com ([209.132.183.28]:19242) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sn10s-00066k-5Z for qemu-devel@nongnu.org; Fri, 06 Jul 2012 01:23:30 -0400 Message-ID: <4FF6764E.20109@redhat.com> Date: Fri, 06 Jul 2012 08:23:26 +0300 From: Orit Wasserman MIME-Version: 1.0 References: <1341492709-13897-1-git-send-email-owasserm@redhat.com> <1341492709-13897-8-git-send-email-owasserm@redhat.com> <4FF59EE3.5030200@redhat.com> In-Reply-To: <4FF59EE3.5030200@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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: Eric Blake 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 On 07/05/2012 05:04 PM, Eric Blake wrote: > 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). >> >> 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 = 0, bytes_sent = -1, ret = -1; >> + XBZRLEHeader hdr = { >> + .xh_len = 0, >> + .xh_flags = 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 = xbzrle_encode_buffer(prev_cached_page, current_data, >> + TARGET_PAGE_SIZE, XBZRLE.encoded_buf, >> + TARGET_PAGE_SIZE); >> + if (encoded_len == 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. > I'm really sorry I missed this, I will fix it for next version Thanks, Orit