From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:38452) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UIhsA-0006QC-ST for qemu-devel@nongnu.org; Thu, 21 Mar 2013 11:57:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UIhs7-0002fl-Pb for qemu-devel@nongnu.org; Thu, 21 Mar 2013 11:57:46 -0400 Received: from [2a02:248:0:30:223:aeff:fefe:7f1c] (port=33554 helo=dns.kamp-intra.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UIhs7-0002fa-Jg for qemu-devel@nongnu.org; Thu, 21 Mar 2013 11:57:43 -0400 From: Peter Lieven Date: Thu, 21 Mar 2013 16:57:28 +0100 Message-Id: <1363881457-14814-1-git-send-email-pl@kamp.de> Subject: [Qemu-devel] [PATCHv3 0/9] buffer_is_zero / migration optimizations List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, pbonzini@redhat.com, Peter Lieven this is v3 of my patch series with various optimizations in zero buffer checking and migration tweaks. thanks especially to Eric Blake for reviewing. v3: - remove asserts, inline functions and add a check function if buffer_find_nonzero_offset() can be used. - use above check function in buffer_is_zero() and find_next_bit(). - use buffer_is_nonzero_offset() directly to find zero pages. we know that all requirements are met for memory pages. - fix C89 violation in buffer_is_zero(). - avoid derefencing p in ram_save_block() if we already know the page is zero. - fix initialization of last_offset in reset_ram_globals(). - avoid skipping pages with offset == 0 in bulk stage in migration_bitmap_find_and_reset_dirty(). - compared to v1 check for zero pages also after bulk ram migration as there are guests (e.g. Windows) which zero out large amount of memory while running. v2: - fix description, add trivial zero check and add asserts to buffer_find_nonzero_offset. - add a constant for the unroll factor of buffer_find_nonzero_offset - replace is_dup_page() by buffer_is_zero() - added test results to xbzrle patch - optimize descriptions Peter Lieven (9): move vector definitions to qemu-common.h cutils: add a function to find non-zero content in a buffer buffer_is_zero: use vector optimizations if possible bitops: use vector algorithm to optimize find_next_bit() migration: search for zero instead of dup pages migration: add an indicator for bulk state of ram migration migration: do not sent zero pages in bulk stage migration: do not search dirty pages in bulk stage migration: use XBZRLE only after bulk stage arch_init.c | 62 ++++++++++++++++++------------------------------- include/qemu-common.h | 27 +++++++++++++++++++++ util/bitops.c | 22 +++++++++++++++--- util/cutils.c | 55 +++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 123 insertions(+), 43 deletions(-) -- 1.7.9.5