From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:56815) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UFRTv-0002d3-72 for qemu-devel@nongnu.org; Tue, 12 Mar 2013 11:51:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UFRTn-0002pR-RP for qemu-devel@nongnu.org; Tue, 12 Mar 2013 11:51:15 -0400 Received: from ssl.dlhnet.de ([91.198.192.8]:46032 helo=ssl.dlh.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UFRTn-0002p0-J5 for qemu-devel@nongnu.org; Tue, 12 Mar 2013 11:51:07 -0400 Message-ID: <513F4EEC.9050903@dlhnet.de> Date: Tue, 12 Mar 2013 16:51:08 +0100 From: Peter Lieven MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [RFC][PATCH 5/9] migration: check for dup pages only in bulk stage List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "qemu-devel@nongnu.org" Cc: Kevin Wolf , Paolo Bonzini , Orit Wasserman , Stefan Hajnoczi pages are dup (most likely zero) from the very beginning. unless there is an application running inside the VM zeroing out large areas of memory its wasted time for checking for dup pages after the bulk stage. Signed-off-by: Peter Lieven --- arch_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch_init.c b/arch_init.c index d48b914..3d09327 100644 --- a/arch_init.c +++ b/arch_init.c @@ -445,7 +445,7 @@ static int ram_save_block(QEMUFile *f, bool last_stage) /* In doubt sent page as normal */ bytes_sent = -1; - if (is_dup_page(p)) { + if (ram_bulk_stage && is_dup_page(p)) { acct_info.dup_pages++; bytes_sent = save_block_hdr(f, block, offset, cont, RAM_SAVE_FLAG_COMPRESS); -- 1.7.9.5