From patchwork Mon Apr 8 08:33:44 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Lieven X-Patchwork-Id: 234599 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 6D47F2C00C1 for ; Mon, 8 Apr 2013 18:34:14 +1000 (EST) Received: from localhost ([::1]:42634 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UP7Wl-0002DI-Qm for incoming@patchwork.ozlabs.org; Mon, 08 Apr 2013 04:34:11 -0400 Received: from eggs.gnu.org ([208.118.235.92]:58799) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UP7WT-0002DC-SS for qemu-devel@nongnu.org; Mon, 08 Apr 2013 04:33:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UP7WQ-0007lW-II for qemu-devel@nongnu.org; Mon, 08 Apr 2013 04:33:53 -0400 Received: from mx.ipv6.kamp.de ([2a02:248:0:51::16]:36517 helo=mx01.kamp.de) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1UP7WQ-0007l2-9n for qemu-devel@nongnu.org; Mon, 08 Apr 2013 04:33:50 -0400 Received: (qmail 21822 invoked by uid 89); 8 Apr 2013 08:33:47 -0000 Received: from [195.62.97.28] by client-16-kamp (envelope-from , uid 89) with qmail-scanner-2.01 (clamdscan: 0.97.7/16976. hbedv: 8.2.12.24/7.11.71.6. spamassassin: 3.3.1. Clear:RC:1(195.62.97.28):SA:0(-2.2/5.0):. Processed in 1.994138 secs); 08 Apr 2013 08:33:47 -0000 Received: from smtp.kamp.de (HELO submission.kamp.de) ([195.62.97.28]) by mx01.kamp.de with SMTP; 8 Apr 2013 08:33:45 -0000 X-GL_Whitelist: yes Received: (qmail 383 invoked from network); 8 Apr 2013 08:33:43 -0000 Received: from lieven-mac.kamp-intra.net (pl@kamp.de@172.21.12.68) by submission.kamp.de with ESMTPS (AES128-SHA encrypted) ESMTPA; 8 Apr 2013 08:33:43 -0000 Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\)) From: Peter Lieven In-Reply-To: <20130405192327.GG2351@dhcp-200-207.str.redhat.com> Date: Mon, 8 Apr 2013 10:33:44 +0200 Message-Id: <49B72003-C5C1-4109-806F-260F3522BD5B@kamp.de> 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> To: Kevin Wolf X-Mailer: Apple Mail (2.1499) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a02:248:0:51::16 Cc: Anthony Liguori , quintela@redhat.com, Stefan Hajnoczi , qemu-devel@nongnu.org, Orit Wasserman , Paolo Bonzini Subject: Re: [Qemu-devel] [PATCHv5 06/10] migration: search for zero instead of dup pages X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Am 05.04.2013 um 21:23 schrieb Kevin Wolf : > Am 26.03.2013 um 10:58 hat Peter Lieven geschrieben: >> 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. > Can you try if the following solves your issue: BR, Peter diff --git a/exec.c b/exec.c index 786987a..54baa4a 100644 --- a/exec.c +++ b/exec.c @@ -1071,6 +1071,7 @@ ram_addr_t qemu_ram_alloc_from_ptr(ram_addr_t size, void *host, memory_try_enable_merging(new_block->host, size); } } + qemu_madvise(new_block->host, size, QEMU_MADV_DONTNEED); new_block->length = size; /* Keep the list sorted from biggest to smallest block. */