From patchwork Mon Oct 29 14:11:25 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juan Quintela X-Patchwork-Id: 195003 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 471282C008B for ; Tue, 30 Oct 2012 01:12:02 +1100 (EST) Received: from localhost ([::1]:34871 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TSq4N-0001V2-Js for incoming@patchwork.ozlabs.org; Mon, 29 Oct 2012 10:11:59 -0400 Received: from eggs.gnu.org ([208.118.235.92]:38707) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TSq4G-0001Uu-GW for qemu-devel@nongnu.org; Mon, 29 Oct 2012 10:11:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TSq4C-0007AI-0S for qemu-devel@nongnu.org; Mon, 29 Oct 2012 10:11:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45075) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TSq4B-0007A4-MS for qemu-devel@nongnu.org; Mon, 29 Oct 2012 10:11:47 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q9TEBlxw031436 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 29 Oct 2012 10:11:47 -0400 Received: from trasno.mitica (ovpn-113-116.phx2.redhat.com [10.3.113.116]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q9TEBikD011647; Mon, 29 Oct 2012 10:11:45 -0400 From: Juan Quintela To: qemu-devel@nongnu.org Date: Mon, 29 Oct 2012 15:11:25 +0100 Message-Id: <1351519903-26607-1-git-send-email-quintela@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Cc: owasserm@redhat.com, mtosatti@redhat.com, avi@redhat.com, pbonzini@redhat.com Subject: [Qemu-devel] [PATCH 00/18] Migration thread lite (20121029) 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 Hi After discussing with Anthony and Paolo, this is the minimal migration thread support that we can do for 1.3. - fixed all the comments (thanks eric, paolo and orit). - buffered_file.c remains until 1.4. - testing for vinod showed very nice results, that is why the bitmap handling optimizations remain. Note: Writes has become blocking, and I have to change the "remove" the feature now in qemu-sockets.c. Checked that migration was the only user of that feature. If new users appear, they just need to add the socket_set_nonblock() by hand. Please, review. Thanks, Juan. The following changes since commit 50cd72148211c5e5f22ea2519d19ce024226e61f: hw/xtensa_sim: get rid of intermediate xtensa_sim_init (2012-10-27 15:04:00 +0000) are available in the git repository at: http://repo.or.cz/r/qemu/quintela.git migration-thread-20121029 for you to fetch changes up to 2c74654f19efc7db35117a87c0d9db4776931e1b: ram: optimize migration bitmap walking (2012-10-29 14:14:28 +0100) Juan Quintela (15): buffered_file: Move from using a timer to use a thread migration: make qemu_fopen_ops_buffered() return void migration: stop all cpus correctly migration: make writes blocking migration: remove unfreeze logic migration: take finer locking buffered_file: Unfold the trick to restart generating migration data buffered_file: don't flush on put buffer buffered_file: unfold buffered_append in buffered_put_buffer savevm: New save live migration method: pending migration: include qemu-file.h migration-fd: remove duplicate include memory: introduce memory_region_test_and_clear_dirty ram: Use memory_region_test_and_clear_dirty ram: optimize migration bitmap walking Paolo Bonzini (1): split MRU ram list Umesh Deshpande (2): add a version number to ram_list protect the ramlist with a separate mutex arch_init.c | 115 ++++++++++++++++++++++++----------------------- block-migration.c | 49 +++++--------------- buffered_file.c | 130 +++++++++++++++++++++++++----------------------------- buffered_file.h | 2 +- cpu-all.h | 15 ++++++- exec.c | 44 +++++++++++++++--- memory.c | 16 +++++++ memory.h | 18 ++++++++ migration-exec.c | 3 +- migration-fd.c | 4 +- migration-tcp.c | 2 +- migration-unix.c | 2 +- migration.c | 100 ++++++++++++++++------------------------- migration.h | 4 +- qemu-file.h | 5 --- qemu-sockets.c | 4 -- savevm.c | 24 +++++++--- sysemu.h | 1 + vmstate.h | 1 + 19 files changed, 280 insertions(+), 259 deletions(-)