From patchwork Tue Sep 10 03:43:24 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jules Wang X-Patchwork-Id: 273886 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 2F8032C00EF for ; Wed, 11 Sep 2013 00:30:31 +1000 (EST) Received: from localhost ([::1]:58345 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VJOxZ-0003qx-8a for incoming@patchwork.ozlabs.org; Tue, 10 Sep 2013 10:30:29 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54083) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VJFHF-0000Tf-Ov for qemu-devel@nongnu.org; Tue, 10 Sep 2013 00:10:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VJFH2-0002D0-0Q for qemu-devel@nongnu.org; Tue, 10 Sep 2013 00:10:09 -0400 Received: from [2001:250:208:1181:6e92:bfff:fe00:bcdb] (port=45359 helo=mail.cs2c.com.cn) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VJFH1-0002BD-Ll for qemu-devel@nongnu.org; Tue, 10 Sep 2013 00:09:55 -0400 Received: from localhost.localdomain (cs2c.com.cn [127.0.0.1]) by mail.cs2c.com.cn (NSMail) with ESMTPA id 21295B800DD; Tue, 10 Sep 2013 11:36:52 +0800 (CST) BANMAU_FRONT_USER_AUTHED: 1 BANMAU_FRONT_RESULT: 01 BANMAU_FRONT_SUSPICION_REASON: 0 X-Forward-For: 124.205.131.210 From: Jules Wang To: qemu-devel@nongnu.org Date: Tue, 10 Sep 2013 11:43:24 +0800 Message-Id: <1378784607-7398-2-git-send-email-junqing.wang@cs2c.com.cn> X-Mailer: git-send-email 1.8.0.1 In-Reply-To: <1378784607-7398-1-git-send-email-junqing.wang@cs2c.com.cn> References: <1378784607-7398-1-git-send-email-junqing.wang@cs2c.com.cn> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 2001:250:208:1181:6e92:bfff:fe00:bcdb X-Mailman-Approved-At: Tue, 10 Sep 2013 10:27:18 -0400 Cc: quintela@redhat.com, owasserm@redhat.com, Jules Wang , stefanha@redhat.com, pbonzini@redhat.com Subject: [Qemu-devel] [PATCH RFC 1/4] Curling: add doc 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 Curling provides fault tolerant mechanism for KVM. For more info, see 'doc/curling.txt'. Signed-off-by: Jules Wang --- docs/curling.txt | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 docs/curling.txt diff --git a/docs/curling.txt b/docs/curling.txt new file mode 100644 index 0000000..dace6db --- /dev/null +++ b/docs/curling.txt @@ -0,0 +1,52 @@ +KVM Fault Tolerance Specification +================================= + + +Contents: +========= +* Introduction +* Usage +* Design & Implement +* Performance + +Introduction +============ +The goal of Curling(sports) is to provide a fault tolerant(ft for short) +mechanism for KVM, so that in the event of a hardware failure, the virtual +machine fails over to the backup in a way that is completely transparent +to the guest operating system. + + +Usage +===== +The steps of curling are the same as the steps of live migration except the +following: +1. Start the receiver vm with -incoming curling:tcp:
: +2. Start ft in the qemu monitor of sender vm by following cmdline: + > migrate_set_speed + > migrate curling:tcp:
: +3. Connect to the receiver vm by vnc or spice. The screen of the vm is displayed +when curling is ready. +4. Now, the sender vm is protected by ft, When it encounters a failure, +the failover kicks in. + + + +Design & Implement +================== +* By leveraging live migration feature, we do endless live migrations between +the sender and receiver, so the two virtual machines are synchronized. + +* The receiver does not load vm state once the migration begins, instead, it +perfetches one whole migration data into a buffer, then loads vm state from +that buffer afterwards. This "all or nothing" approach prevents the +broken-in-the-middle problem Kemari has. + +* The sender sleeps a little while after each migration, to ease the +performance penalty entailed by vm_stop and iothread locks. This is a +tradeoff between performance and accuracy. +.... + + +Performance +===========