1 Star 0 Fork 109

panchenbo / qemu

forked from src-openEuler / qemu 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
migration-report-migration-related-thread-pid-to-lib.patch 1.36 KB
一键复制 编辑 原始数据 按行查看 历史
yezengruan 提交于 2022-12-14 15:50 . QEMU update to version 6.2.0-64
From f8bc91f17630ddf9272fba600f4452a3871b3fec Mon Sep 17 00:00:00 2001
From: zhengchuan <zhengchuan@huawei.com>
Date: Mon, 5 Dec 2022 20:52:25 +0800
Subject: [PATCH 4/5] migration: report migration related thread pid to libvirt
in order to control migration thread cgroup,
we need to report migration related thread pid to libvirt
Signed-off-by:zhengchuan<zhengchuan@huawei.com>
---
migration/migration.c | 3 +++
qapi/migration.json | 12 ++++++++++++
2 files changed, 15 insertions(+)
diff --git a/migration/migration.c b/migration/migration.c
index f86dd8cccd..33d5832e47 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -3823,6 +3823,9 @@ static void *migration_thread(void *opaque)
MigThrError thr_error;
bool urgent = false;
+ /* report migration thread pid to libvirt */
+ qapi_event_send_migration_pid(qemu_get_thread_id());
+
rcu_register_thread();
object_ref(OBJECT(s));
diff --git a/qapi/migration.json b/qapi/migration.json
index fee266017d..48e3d36d39 100644
--- a/qapi/migration.json
+++ b/qapi/migration.json
@@ -1284,6 +1284,18 @@
{ 'event': 'MIGRATION_PASS',
'data': { 'pass': 'int' } }
+##
+# @MIGRATION_PID:
+#
+# Emitted when migration thread appear
+#
+# @pid: pid of migration thread
+#
+# Since: EulerOS Virtual
+##
+{ 'event': 'MIGRATION_PID',
+ 'data': { 'pid': 'int' } }
+
##
# @COLOMessage:
#
--
2.27.0
1
https://gitee.com/panchenbo/qemu.git
git@gitee.com:panchenbo/qemu.git
panchenbo
qemu
qemu
master

搜索帮助