From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=33254 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OM66P-000798-9R for qemu-devel@nongnu.org; Tue, 08 Jun 2010 17:12:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OM66L-0004XN-QS for qemu-devel@nongnu.org; Tue, 08 Jun 2010 17:12:51 -0400 Received: from mx1.redhat.com ([209.132.183.28]:17171) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OM66L-0004X3-Jd for qemu-devel@nongnu.org; Tue, 08 Jun 2010 17:12:49 -0400 From: Alex Williamson In-Reply-To: <4C0EA42A.6000005@codemonkey.ws> References: <20100608191447.4451.47795.stgit@localhost.localdomain> <20100608191633.4451.59848.stgit@localhost.localdomain> <4C0EA42A.6000005@codemonkey.ws> Content-Type: text/plain; charset="UTF-8" Date: Tue, 08 Jun 2010 15:12:41 -0600 Message-ID: <1276031561.3079.2.camel@x201> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [RFC PATCH 5/6] savevm: Migrate RAM based on name/offset List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: chrisw@redhat.com, qemu-devel@nongnu.org, kvm@vger.kernel.org, quintela@redhat.com On Tue, 2010-06-08 at 15:12 -0500, Anthony Liguori wrote: > On 06/08/2010 02:16 PM, Alex Williamson wrote: > > if (is_dup_page(p, *p)) { > > - qemu_put_be64(f, current_addr | RAM_SAVE_FLAG_COMPRESS); > > + qemu_put_be64(f, offset | RAM_SAVE_FLAG_COMPRESS); > > + qemu_put_buffer(f, (uint8_t *)block->name, sizeof(block->name)); > > qemu_put_byte(f, *p); > > > > I think we could use some trickery like use another flag in > current_address to determine whether this was a different section from > the previous section and then only encode the section name if that's true. Good suggestion, see patch 7/6 ;) Alex