From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:58373) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UFRWt-00086k-Sc for qemu-devel@nongnu.org; Tue, 12 Mar 2013 11:54:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UFRWn-0003ks-PP for qemu-devel@nongnu.org; Tue, 12 Mar 2013 11:54:19 -0400 Received: from ssl.dlhnet.de ([91.198.192.8]:46063 helo=ssl.dlh.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UFRWn-0003kh-Hc for qemu-devel@nongnu.org; Tue, 12 Mar 2013 11:54:13 -0400 Message-ID: <513F4FA6.6000701@dlhnet.de> Date: Tue, 12 Mar 2013 16:54:14 +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 8/9] migration: do not sent zero_pages 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 if the dup_page is a zero_page do not send it at all. the memory at the destination reads as zero anyway. Signed-off-by: Peter Lieven --- arch_init.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch_init.c b/arch_init.c index 04c82e4..abd54a7 100644 --- a/arch_init.c +++ b/arch_init.c @@ -447,9 +447,11 @@ static int ram_save_block(QEMUFile *f, bool last_stage) bytes_sent = -1; if (ram_bulk_stage && is_dup_page(p)) { acct_info.dup_pages++; - bytes_sent = save_block_hdr(f, block, offset, cont, + if (p[0]) { + bytes_sent = save_block_hdr(f, block, offset, cont, RAM_SAVE_FLAG_COMPRESS); - qemu_put_byte(f, *p); + qemu_put_byte(f, *p); + } bytes_sent += 1; } else if (!ram_bulk_stage && migrate_use_xbzrle()) { current_addr = block->offset + offset; -- 1.7.9.5