Received: from eggs.gnu.org ([208.118.235.92]:41709) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U1twV-0007sj-Ng for qemu-devel@nongnu.org; Sun, 03 Feb 2013 02:24:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U1twR-0002Ov-KW for qemu-devel@nongnu.org; Sun, 03 Feb 2013 02:24:47 -0500 Received: from ssl.dlhnet.de ([91.198.192.8]:58540 helo=ssl.dlh.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U1twR-0002OX-E1 for qemu-devel@nongnu.org; Sun, 03 Feb 2013 02:24:43 -0500 Message-ID: <510E10B8.8080706@dlhnet.de> Date: Sun, 03 Feb 2013 08:24:40 +0100 From: Peter Lieven MIME-Version: 1.0 References: <510A15DC.3070706@dlhnet.de> <510A218C.2000903@redhat.com> <85C05B4E-E6BC-43D3-917F-E3EAC674F2EA@dlhnet.de> <510A2C3D.3060001@redhat.com> <510BF56F.7080104@redhat.com> In-Reply-To: <510BF56F.7080104@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] RFC migration of zero pages List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Orit Wasserman , "qemu-devel@nongnu.org" Am 01.02.2013 18:03, schrieb Paolo Bonzini: > Il 31/01/2013 09:33, Orit Wasserman ha scritto: >>>> If my above assumption that the guest reads unmapped memory as zeroes is right, this mapping >>>> is not necessary in the case of a zero dup page. >>>> >>>> We just have to make sure that we are still in the very first round when deciding not to sent >>>> a zero page, because otherwise it could be a page that has become zero during migration and >>>> this of course has to be transferred. >> OK, so if we won't send the pages than it won't be allocate in the dst and it can improve both >> memory usage and reduce cpu consumption on it. >> That can be good for over commit scenario. > > We don't allocate zero pages in the destination: > > #ifndef _WIN32 > if (ch == 0 && > (!kvm_enabled() || kvm_has_sync_mmu()) && > getpagesize() <= TARGET_PAGE_SIZE) { > qemu_madvise(host, TARGET_PAGE_SIZE, QEMU_MADV_DONTNEED); > } > #endif Sorry I was not aware of this. So the only possible benefit left would be to not sent zero pages in the first round at all which would avoid the 9 bytes (header + ch) per page + memset and madvise on the target. Peter > > Paolo >