Message ID | 20180811205924.4113-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 75D5913B4 for <patchwork-qemu-devel@patchwork.kernel.org>; Sat, 11 Aug 2018 21:18:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6648C29C87 for <patchwork-qemu-devel@patchwork.kernel.org>; Sat, 11 Aug 2018 21:18:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 56BD529C9C; Sat, 11 Aug 2018 21:18:31 +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 0752029C87 for <patchwork-qemu-devel@patchwork.kernel.org>; Sat, 11 Aug 2018 21:18:31 +0000 (UTC) Received: from localhost ([::1]:33268 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 1fobHK-00044n-Aa for patchwork-qemu-devel@patchwork.kernel.org; Sat, 11 Aug 2018 17:18:30 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48356) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <zhangckid@gmail.com>) id 1fob0j-0005bi-8d for qemu-devel@nongnu.org; Sat, 11 Aug 2018 17:01:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <zhangckid@gmail.com>) id 1fob0i-0001kX-HQ for qemu-devel@nongnu.org; Sat, 11 Aug 2018 17:01:21 -0400 Received: from mail-pf1-x442.google.com ([2607:f8b0:4864:20::442]:43715) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from <zhangckid@gmail.com>) id 1fob0i-0001jx-AJ for qemu-devel@nongnu.org; Sat, 11 Aug 2018 17:01:20 -0400 Received: by mail-pf1-x442.google.com with SMTP id j26-v6so5995949pfi.10 for <qemu-devel@nongnu.org>; Sat, 11 Aug 2018 14:01:20 -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=HJs1IyP47L5VWSWXnfNk3rt/hlTP0bhjrgYjnFnswxY=; b=F+PxArHkFXwasL4icOxC+VlvGsD+1YYj3EeDvs9eiVS7Tnt6wOJrXUYGzX+0iJx11d jR/0YgULQIw5lXqfE+65/R5R5uKsZ+gEvHhE8XqoSeC2W+xWTjK07JIZqAs5b/KnP7a6 4eHMquGaWlCY0exhhuv+L5E4tGG8r/DLpNbusz3drHV7za91ljtEdQUKrjBRoMoyIVyf tBS743q6KsAlCJNAfNT2AsFskDOxAaTY7ml1vGyx24nA7m2DSwAfrhx0pM/G/ygDLD34 59+7VGfUJn9fVaUkh1S3AydVt9Lzhe9/E8eXSaNwp7/HsqDhBdx7Rnhqf5ZcqclRAe3X Ne4w== 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=HJs1IyP47L5VWSWXnfNk3rt/hlTP0bhjrgYjnFnswxY=; b=cCUdbbh8mcCnYM1Drtojai3vOPhU7VQbnoaPt4HZI6I05uTVWFdYww5gaeExmeI7nl Gn5IQK17sY2rgnsU9c46uNh/0XUHp11Skfm2kclf9+ZwxJVYKhsPVh6I/rX/GkcvBS9F +f+lhMYAqAbc94tX8bGOWC9SnrFEHSA1gP7dnQP3N7XKyuP5vKPhP+W0EB6YskkRbz7m jaIZWXnnKp6bM+m7FqzUgP/5kDdmhA5uyQnEQd1RHN44N9BkVL/jTuCi/iVVb5h5RC/C c4Xpdclrb+jWVRN6igsUZsmdSWDl61c9QNXiThio4JVl3bz2UH+ZafuFPLcURoeLMrig zl4w== X-Gm-Message-State: AOUpUlGORGkRNOhMwPwRRS9laOKBEZebva9WRtZE795kswBUxSxFHGJe xQjQajdb9vEftESJ3MsdsgqI4Ve7 X-Google-Smtp-Source: AA+uWPzB5Cc+0Wy2422R/K+4rK+aj7sAPVmV9c7u5QPZ9QFgqz6gyLkoXut0oXB3d8oPCLCOF3KzQQ== X-Received: by 2002:a62:f208:: with SMTP id m8-v6mr12504888pfh.171.1534021279079; Sat, 11 Aug 2018 14:01:19 -0700 (PDT) Received: from localhost.localdomain (155.150.229.35.bc.googleusercontent.com. [35.229.150.155]) by smtp.gmail.com with ESMTPSA id h24-v6sm23502641pfk.113.2018.08.11.14.01.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 11 Aug 2018 14:01:18 -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: Sun, 12 Aug 2018 04:59:23 +0800 Message-Id: <20180811205924.4113-20-zhangckid@gmail.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180811205924.4113-1-zhangckid@gmail.com> References: <20180811205924.4113-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 V11 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;