From: Brendan Cully Subject: Re: [PATCH 1 of 2] tools/libxc: Remus Checkpoint Compression Date: Thu, 16 Jun 2011 09:34:29 -0700 Message-ID: <20110616163429.GA35709@zanzibar.quuxuum.com> References: <5dbafaf24c7036f3e24e.1308239406@athos.nss.cs.ubc.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <5dbafaf24c7036f3e24e.1308239406@athos.nss.cs.ubc.ca> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Shriram Rajagopalan Cc: xen-devel@lists.xensource.com, ian.jackson@eu.citrix.com List-Id: xen-devel@lists.xenproject.org On Thursday, 16 June 2011 at 08:50, Shriram Rajagopalan wrote: > # HG changeset patch > # User Shriram Rajagopalan > # Date 1308238095 25200 > # Node ID 5dbafaf24c7036f3e24e4387797b32e59d732ac6 > # Parent 23c068b109236657ededa3e3b7f180346a5cd9f9 > tools/libxc: Remus Checkpoint Compression > > Instead of sending dirty pages of guest memory as-is, use a simple compression > algorithm that sends a RLE-encoded XOR of the page against its last sent copy. > A small LRU cache is used to hold recently dirtied pages. Pagetable pages are > sent as-is, as they are canonicalized at sender side and uncanonicalized at > receiver. > > Signed-off-by: Shriram Rajagopalan ... > @@ -1395,6 +1455,7 @@ > } > > pagebuf.nr_physpages = pagebuf.nr_pages = 0; > + pagebuf.compbuf_pos = pagebuf.compbuf_size = 0; > > n += j; /* crude stats */ > Is that zeroing compbuf_size at the end of every round? Does that mean you're doing a realloc for every single page you ever receive? Ouch.