From 16c188d246f8d74f3d25098effdb836cdeb17e16 Mon Sep 17 00:00:00 2001 From: jipengfei 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 --- 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(¶m->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