1 Star 0 Fork 120

sdf_2022/qemu

forked from src-openEuler/qemu 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
migration-report-multiFd-related-thread-pid-to-libvi.patch 1.57 KB
一键复制 编辑 原始数据 按行查看 历史
yezengruan 提交于 2022-12-14 15:50 . QEMU update to version 6.2.0-64
From 5bc58d9cecbcb56c2494ea4aee7cd8a4a988b403 Mon Sep 17 00:00:00 2001
From: zhengchuan <zhengchuan@huawei.com>
Date: Mon, 5 Dec 2022 20:56:35 +0800
Subject: [PATCH 5/5] migration: report multiFd related thread pid to libvirt
report multiFd related thread pid to libvirt in order to
pin multiFd thread to different cpu.
Signed-off-by:zhengchuan<zhengchuan@huawei.com>
---
migration/multifd.c | 4 ++++
qapi/migration.json | 12 ++++++++++++
2 files changed, 16 insertions(+)
diff --git a/migration/multifd.c b/migration/multifd.c
index 7c9deb1921..0d3f66537c 100644
--- a/migration/multifd.c
+++ b/migration/multifd.c
@@ -17,6 +17,7 @@
#include "exec/ramblock.h"
#include "qemu/error-report.h"
#include "qapi/error.h"
+#include "qapi/qapi-events-migration.h"
#include "ram.h"
#include "migration.h"
#include "socket.h"
@@ -629,6 +630,9 @@ static void *multifd_send_thread(void *opaque)
int ret = 0;
uint32_t flags = 0;
+ /* report multifd thread pid to libvirt */
+ qapi_event_send_migration_multifd_pid(qemu_get_thread_id());
+
trace_multifd_send_thread_start(p->id);
rcu_register_thread();
diff --git a/qapi/migration.json b/qapi/migration.json
index 48e3d36d39..8e18fd30e4 100644
--- a/qapi/migration.json
+++ b/qapi/migration.json
@@ -1284,6 +1284,18 @@
{ 'event': 'MIGRATION_PASS',
'data': { 'pass': 'int' } }
+##
+# @MIGRATION_MULTIFD_PID:
+#
+# Emitted when multifd thread appear
+#
+# @pid: pid of multifd thread
+#
+# Since: EulerOS Virtual
+##
+{ 'event': 'MIGRATION_MULTIFD_PID',
+ 'data': { 'pid': 'int' } }
+
##
# @MIGRATION_PID:
#
--
2.27.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/songdf_2022/qemu.git
git@gitee.com:songdf_2022/qemu.git
songdf_2022
qemu
qemu
master

搜索帮助