[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 1/2] migration: report migration related thread pid to libvirt
From: |
Jiang Jiacheng |
Subject: |
[PATCH 1/2] migration: report migration related thread pid to libvirt |
Date: |
Mon, 9 Jan 2023 19:16:30 +0800 |
From: Zheng Chuan <zhengchuan@huawei.com>
Report migration thread pid to libvirt in order to pin
migration thread to different cpu.
---
migration/migration.c | 3 +++
qapi/migration.json | 12 ++++++++++++
2 files changed, 15 insertions(+)
diff --git a/migration/migration.c b/migration/migration.c
index 52b5d39244..2534e5a1f1 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -3955,6 +3955,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 88ecf86ac8..aafc940617 100644
--- a/qapi/migration.json
+++ b/qapi/migration.json
@@ -1286,6 +1286,18 @@
{ 'event': 'MIGRATION_PASS',
'data': { 'pass': 'int' } }
+##
+# @MIGRATION_PID:
+#
+# Emitted when migration thread appear
+#
+# @pid: pid of migration thread
+#
+# Since: 7.2
+##
+{ 'event': 'MIGRATION_PID',
+ 'data': { 'pid': 'int' } }
+
##
# @COLOMessage:
#
--
2.33.0