Message ID | 20180722193350.6028-20-zhangckid@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 57F581805 for <patchwork-qemu-devel@patchwork.kernel.org>; Sun, 22 Jul 2018 19:44:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 46D3C2842E for <patchwork-qemu-devel@patchwork.kernel.org>; Sun, 22 Jul 2018 19:44:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3B33C28434; Sun, 22 Jul 2018 19:44:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E466B2842E for <patchwork-qemu-devel@patchwork.kernel.org>; Sun, 22 Jul 2018 19:44:54 +0000 (UTC) Received: from localhost ([::1]:57264 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org>) id 1fhKHm-0002cc-2e for patchwork-qemu-devel@patchwork.kernel.org; Sun, 22 Jul 2018 15:44:54 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37984) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <zhangckid@gmail.com>) id 1fhK99-0003We-B3 for qemu-devel@nongnu.org; Sun, 22 Jul 2018 15:36:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <zhangckid@gmail.com>) id 1fhK96-00016k-7j for qemu-devel@nongnu.org; Sun, 22 Jul 2018 15:35:59 -0400 Received: from mail-pf1-x442.google.com ([2607:f8b0:4864:20::442]:33572) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from <zhangckid@gmail.com>) id 1fhK96-00016b-1t for qemu-devel@nongnu.org; Sun, 22 Jul 2018 15:35:56 -0400 Received: by mail-pf1-x442.google.com with SMTP id b17-v6so495856pfi.0 for <qemu-devel@nongnu.org>; Sun, 22 Jul 2018 12:35:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=mU7awURrWAnfdKXiuwCryS0yrZb2zbth6Y2Fz4lEEgw=; b=i1+WA6vF5sIWUzFFcFQOtOEJpOc6yZMp162cxRitduNB86JCncLDoFWwLnut1ptvMO eLiw7MPwyQjtC9RkkCBYZufXc+VQLHr0CVborJzrOxpiNkNtQJZb+JaFI3/GqL3WyTbS EYJYqGDJLR2bccRM/I+dULh6bnHTkagmS0UqpLyjKW8umkoE8moqoYhvjabinmj3qHen K/W70ObjgQGu4JGatpXUS1ZFmVrYHc8fABu+dbkhxddi3eipCXpdpeuXk7qd/ClnUxvg 8B3ipD/u5qii8YbjJ2W5kH5WFy1Ai7Mq+K7H/8TMJJUi3dYodn4G3Km+Cs/Y/Nje4HRG sWfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=mU7awURrWAnfdKXiuwCryS0yrZb2zbth6Y2Fz4lEEgw=; b=d4cwuKYgjfmAKLTy9ZqDeIhLC5Z79noVjze3ezJFwsTBUIps3qFa7AK6ToFdWBkEIq Vn155/KlJnG0Z1oOlsVHHJrcxKxJsnIWSqTK3iXKoWszeikpXzhtNq44kTkL/cR1OHaD 3ZuofcmL6t4Hf7dd7O6vNV7GaO5MV8p3nVHZxssKhHv6s51Hk4PrOH27YEgrO71bDnhN zNzrZ67g3Df0t9bnsIlViqVnZOiEh6TeO3dpG+rMYCY5/7eKvet2z9zcpHTRKy3Q7QCK nreH5Axha96Fb5jYBvV2T7IKGQtUKjbvDDDHzACjgDKAvOwb7sdDsvYTko/dJN/lmoo6 vong== X-Gm-Message-State: AOUpUlE64kfG1YBlctpJfr8n0r+oCv4cPVvh+2zRkF+MWrPa6RNk8btk 53jEL2g0hwGHduJkimID3hgROv/W X-Google-Smtp-Source: AAOMgpcAcMnZzEuNLUF0eh8qKLjF6MRELFofRArWdvcBBtW+ZWWQ7ySfoNL9qx5h8Vu3dGp+xJL30Q== X-Received: by 2002:a62:90d4:: with SMTP id q81-v6mr10484591pfk.37.1532288154885; Sun, 22 Jul 2018 12:35:54 -0700 (PDT) Received: from localhost.localdomain (155.150.229.35.bc.googleusercontent.com. [35.229.150.155]) by smtp.gmail.com with ESMTPSA id 87-v6sm14215353pfn.103.2018.07.22.12.35.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 22 Jul 2018 12:35:53 -0700 (PDT) From: Zhang Chen <zhangckid@gmail.com> To: qemu-devel@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>, Juan Quintela <quintela@redhat.com>, "Dr . David Alan Gilbert" <dgilbert@redhat.com>, Jason Wang <jasowang@redhat.com>, Eric Blake <eblake@redhat.com>, Markus Armbruster <armbru@redhat.com> Date: Mon, 23 Jul 2018 03:33:49 +0800 Message-Id: <20180722193350.6028-20-zhangckid@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180722193350.6028-1-zhangckid@gmail.com> References: <20180722193350.6028-1-zhangckid@gmail.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::442 Subject: [Qemu-devel] [PATCH V10 19/20] COLO: quick failover process by kick COLO thread X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <http://lists.nongnu.org/archive/html/qemu-devel/> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Cc: zhanghailiang <zhang.zhanghailiang@huawei.com>, Li Zhijian <lizhijian@cn.fujitsu.com>, Zhang Chen <zhangckid@gmail.com> Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org> X-Virus-Scanned: ClamAV using ClamSMTP |
Series |
COLO: integrate colo frame with block replication and COLO proxy
|
expand
|
diff --git a/migration/colo.c b/migration/colo.c index 8221a18add..e951159071 100644 --- a/migration/colo.c +++ b/migration/colo.c @@ -131,6 +131,11 @@ static void primary_vm_do_failover(void) migrate_set_state(&s->state, MIGRATION_STATUS_COLO, MIGRATION_STATUS_COMPLETED); + /* + * kick COLO thread which might wait at + * qemu_sem_wait(&s->colo_checkpoint_sem). + */ + colo_checkpoint_notify(migrate_get_current()); /* * Wake up COLO thread which may blocked in recv() or send(), @@ -539,6 +544,9 @@ static void colo_process_checkpoint(MigrationState *s) qemu_sem_wait(&s->colo_checkpoint_sem); + if (s->state != MIGRATION_STATUS_COLO) { + goto out; + } ret = colo_do_checkpoint_transaction(s, bioc, fb); if (ret < 0) { goto out;