From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:42487) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U1pMy-0000s9-GD for qemu-devel@nongnu.org; Sat, 02 Feb 2013 21:31:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U1pMq-0007vZ-Iy for qemu-devel@nongnu.org; Sat, 02 Feb 2013 21:31:48 -0500 Received: from mail-we0-x236.google.com ([2a00:1450:400c:c03::236]:59591) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U1pMq-0007sU-BQ for qemu-devel@nongnu.org; Sat, 02 Feb 2013 21:31:40 -0500 Received: by mail-we0-f182.google.com with SMTP id t57so4062948wey.27 for ; Sat, 02 Feb 2013 18:31:39 -0800 (PST) Sender: Paolo Bonzini Message-ID: <510BF56F.7080104@redhat.com> Date: Fri, 01 Feb 2013 18:03:43 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <510A15DC.3070706@dlhnet.de> <510A218C.2000903@redhat.com> <85C05B4E-E6BC-43D3-917F-E3EAC674F2EA@dlhnet.de> <510A2C3D.3060001@redhat.com> In-Reply-To: <510A2C3D.3060001@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: Orit Wasserman Cc: Peter Lieven , "qemu-devel@nongnu.org" 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 Paolo