From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Williamson Subject: Re: [RFC PATCH 5/6] savevm: Migrate RAM based on name/offset Date: Tue, 08 Jun 2010 15:12:41 -0600 Message-ID: <1276031561.3079.2.camel@x201> References: <20100608191447.4451.47795.stgit@localhost.localdomain> <20100608191633.4451.59848.stgit@localhost.localdomain> <4C0EA42A.6000005@codemonkey.ws> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org, quintela@redhat.com, chrisw@redhat.com To: Anthony Liguori Return-path: Received: from mx1.redhat.com ([209.132.183.28]:55606 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752373Ab0FHVMu (ORCPT ); Tue, 8 Jun 2010 17:12:50 -0400 In-Reply-To: <4C0EA42A.6000005@codemonkey.ws> Sender: kvm-owner@vger.kernel.org List-ID: 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