From: Chuan Zheng <zhengchuan@huawei.com>
To: <quintela@redhat.com>, <dgilbert@redhat.com>
Cc: yubihong@huawei.com, zhang.zhanghailiang@huawei.com,
qemu-devel@nongnu.org, xiexiangyou@huawei.com,
alex.chen@huawei.com, wanghao232@huawei.com
Subject: [PATCH v1 4/4] migration/debug: add DEBUG_MIGRATION_CONSISTENCY_CHECK macros
Date: Mon, 26 Oct 2020 21:58:45 +0800 [thread overview]
Message-ID: <1603720725-81206-5-git-send-email-zhengchuan@huawei.com> (raw)
In-Reply-To: <1603720725-81206-1-git-send-email-zhengchuan@huawei.com>
Signed-off-by: Chuan Zheng <zhengchuan@huawei.com>
---
migration/migration.c | 2 ++
migration/savevm.c | 2 ++
2 files changed, 4 insertions(+)
diff --git a/migration/migration.c b/migration/migration.c
index f4434c4..fe2bb3a 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -1678,7 +1678,9 @@ static void migrate_fd_cleanup(MigrationState *s)
tmp = s->to_dst_file;
s->to_dst_file = NULL;
qemu_mutex_unlock(&s->qemu_file_lock);
+#ifdef DEBUG_MIGRATION_CONSISTENCY_CHECK
MIGRATION_RAM_CONSISTENCY_CHECK();
+#endif
/*
* Close the file handle without the lock to make sure the
* critical section won't block for long.
diff --git a/migration/savevm.c b/migration/savevm.c
index 5f989a8..102cd0e 100644
--- a/migration/savevm.c
+++ b/migration/savevm.c
@@ -2636,12 +2636,14 @@ int qemu_loadvm_state(QEMUFile *f)
}
qemu_loadvm_state_cleanup();
+#ifdef DEBUG_MIGRATION_CONSISTENCY_CHECK
/*
* cpu_synchronize_all_post_init->kvm_put_msrs will update the
* kvmclock share-mem.
* So this's the latest point at which the ram is the same as source
*/
MIGRATION_RAM_CONSISTENCY_CHECK();
+#endif
cpu_synchronize_all_post_init();
--
1.8.3.1
prev parent reply other threads:[~2020-10-26 13:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-26 13:58 [PATCH v1 0/4] migration/debug: Add migration ram consistency check Chuan Zheng
2020-10-26 13:58 ` [PATCH v1 1/4] migration/debug: Introduce foreach_migratable_block() Chuan Zheng
2020-10-26 13:58 ` [PATCH v1 2/4] migration/debug: Implement migration memory consistency check Chuan Zheng
2020-10-26 13:58 ` [PATCH v1 3/4] migration/debug: add checkpoint for migration " Chuan Zheng
2020-10-26 13:58 ` Chuan Zheng [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1603720725-81206-5-git-send-email-zhengchuan@huawei.com \
--to=zhengchuan@huawei.com \
--cc=alex.chen@huawei.com \
--cc=dgilbert@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
--cc=wanghao232@huawei.com \
--cc=xiexiangyou@huawei.com \
--cc=yubihong@huawei.com \
--cc=zhang.zhanghailiang@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).