From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:41632) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UOCoY-000779-Q3 for qemu-devel@nongnu.org; Fri, 05 Apr 2013 16:00:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UOCoX-0003xc-1I for qemu-devel@nongnu.org; Fri, 05 Apr 2013 16:00:46 -0400 Received: from mx1.redhat.com ([209.132.183.28]:29207) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UOCoW-0003xJ-Oa for qemu-devel@nongnu.org; Fri, 05 Apr 2013 16:00:44 -0400 Message-ID: <515F2D47.2000002@redhat.com> Date: Fri, 05 Apr 2013 22:00:07 +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> In-Reply-To: <20130405192327.GG2351@dhcp-200-207.str.redhat.com> 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: Kevin Wolf Cc: Anthony Liguori , quintela@redhat.com, Stefan Hajnoczi , Peter Lieven , qemu-devel@nongnu.org, Orit Wasserman Il 05/04/2013 21:23, Kevin Wolf ha scritto: >> > virtually all dup pages are zero pages. remove >> > the special is_dup_page() function and use the >> > optimized buffer_find_nonzero_offset() function >> > instead. >> > >> > here buffer_find_nonzero_offset() is used directly >> > to avoid the unnecssary additional checks in >> > buffer_is_zero(). >> > >> > raw performace gain checking 1 GByte zeroed memory >> > over is_dup_page() is approx. 10-12% with SSE2 >> > and 8-10% with unsigned long arithmedtic. >> > >> > Signed-off-by: Peter Lieven >> > Reviewed-by: Orit Wasserman >> > Reviewed-by: Eric Blake > Okay, so I bisected again and this is the second patch that is involved > in the slowness of qemu-iotests case 007. > > The problem seems to be that the RAM of a guest is in fact _not_ zeroed > during initialisation. It hits my test case reliably because I'm running > with MALLOC_PERTURB_. Now I'm wondering if in practice this happens only > under such test conditions, or if real guests could be affected as well > and we should make sure to get zeroed memory for RAM. I think we should MADV_DONTNEED it. Paolo