1 Star 0 Fork 121

lijian/qemu

forked from src-openEuler/qemu 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
migration-report-compress-thread-pid-to-libvirt.patch 1.41 KB
一键复制 编辑 原始数据 按行查看 历史
From 16c188d246f8d74f3d25098effdb836cdeb17e16 Mon Sep 17 00:00:00 2001
From: jipengfei <jipengfei_yewu@cmss.chinamobile.com>
Date: Sat, 1 Jul 2023 13:08:53 +0800
Subject: [PATCH] migration: report compress thread pid to libvirt
Supports migrating compressed threads bound to physical cores,qemu need to tell libvirt the compress thread pids.
Signed-off-by:jipengfei <jipengfei_yewu@cmss.chinamobile.com>
---
migration/ram.c | 3 +++
qapi/migration.json | 13 +++++++++++++
2 files changed, 16 insertions(+)
diff --git a/migration/ram.c b/migration/ram.c
index c3484ee1a9..c6c59b54d9 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -755,6 +755,9 @@ static void *do_data_compress(void *opaque)
RAMBlock *block;
bool zero_page;
+ /* report compress thread pids to libvirt */
+ qapi_event_send_migration_compress_pid(qemu_get_thread_id());
+
qemu_mutex_lock(&param->mutex);
while (!param->quit) {
if (param->block) {
diff --git a/qapi/migration.json b/qapi/migration.json
index 8e18fd30e4..e965f4329b 100644
--- a/qapi/migration.json
+++ b/qapi/migration.json
@@ -1308,6 +1308,19 @@
{ 'event': 'MIGRATION_PID',
'data': { 'pid': 'int' } }
+##
+# @MIGRATION_COMPRESS_PID:
+#
+# Emitted when compress thread appear
+#
+# @pid: pid of compress thread
+#
+# Since: 6.2
+##
+{ 'event': 'MIGRATION_COMPRESS_PID',
+ 'data': { 'pid': 'int' } }
+
+
##
# @COLOMessage:
#
--
2.41.0.windows.1
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/jianli-97/qemu.git
git@gitee.com:jianli-97/qemu.git
jianli-97
qemu
qemu
master

搜索帮助