From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Lieven Subject: Re: [Bug 1100843] Re: Live Migration Causes Performance Issues Date: Thu, 10 Oct 2013 10:17:35 +0200 Message-ID: <5256629F.10702@kamp.de> References: <20130117163740.7157.55600.malonedeb@gac.canonical.com> <20130926203354.30826.10562.malone@soybean.canonical.com> <52516C4A.6080508@gmail.com> <525256FC.6060608@dlhnet.de> <525280C7.2050402@redhat.com> <525283A6.1070605@dlhnet.de> <52528508.4030204@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, gleb@redhat.com, quintela@redhat.com, mtosatti@redhat.com, qemu-devel , Zhang Haoyu , xiaoguangrong@linux.vnet.ibm.com, Bug 1100843 <1100843@bugs.launchpad.net>, mst@redhat.com, afaerber@suse.de To: Paolo Bonzini Return-path: In-Reply-To: <52528508.4030204@redhat.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org Sender: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org List-Id: kvm.vger.kernel.org On 07.10.2013 11:55, Paolo Bonzini wrote: > Il 07/10/2013 11:49, Peter Lieven ha scritto: >>> It's in general not easy to do this if you take non-x86 targets into >>> account. >> What about the dirty way to zero out all non zero pages at the beginning of >> ram_load? > I'm not sure I follow? sth like this for each ram block at the beginning of ram_load. + base = memory_region_get_ram_ptr(block->mr); + for (offset = 0; offset < block->length; + offset += TARGET_PAGE_SIZE) { + if (!is_zero_page(base + offset)) { + memset(base + offset, 0x00, TARGET_PAGE_SIZE); + } + } + Then add a capability "skip_zero_pages" which does not sent them on the source and enables this zeroing. it would also be possible to skip the zero check for each incoming compressed pages. Peter