From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:59961) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UP7as-0004Xt-Nd for qemu-devel@nongnu.org; Mon, 08 Apr 2013 04:38:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UP7ao-0001Ft-JD for qemu-devel@nongnu.org; Mon, 08 Apr 2013 04:38:26 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57509) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UP7ao-0001Fk-B6 for qemu-devel@nongnu.org; Mon, 08 Apr 2013 04:38:22 -0400 Message-ID: <516281F3.9030503@redhat.com> Date: Mon, 08 Apr 2013 10:38:11 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1364291919-19563-1-git-send-email-pl@kamp.de> <1364291919-19563-7-git-send-email-pl@kamp.de> <20130405192327.GG2351@dhcp-200-207.str.redhat.com> <515F2D47.2000002@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCHv5 06/10] migration: search for zero instead of dup pages List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Lieven Cc: Kevin Wolf , Anthony Liguori , quintela@redhat.com, Stefan Hajnoczi , qemu-devel@nongnu.org, Orit Wasserman Il 06/04/2013 00:06, Peter Lieven ha scritto: >> > I think we should MADV_DONTNEED it. > i have to correct myself, on Linux it seems that MADV_DONTNEED guarantees that > subsequent reads will return a zero filled page. > > If I am right with that we could MADV_DONTNEED the memory on startup and keep > not sending zero pages in bulk stage if we are running under Linux. Am I right with that? Actually we can use mmap+munmap to allocate a well-aligned, always zero block for the RAM. Paolo