@@ -28,6 +28,8 @@
#include "sysemu/runstate.h"
#include "migration/misc.h"
+#define MIGRATION_THREAD_SRC_MAIN "mig/src/main"
+
struct PostcopyBlocktimeContext;
#define MIGRATION_RESUME_ACK_VALUE (1)
@@ -3467,7 +3467,8 @@ static void *migration_thread(void *opaque)
Error *local_err = NULL;
int ret;
- thread = migration_threads_add("live_migration", qemu_get_thread_id());
+ thread = migration_threads_add(MIGRATION_THREAD_SRC_MAIN,
+ qemu_get_thread_id());
rcu_register_thread();
@@ -3820,7 +3821,7 @@ void migrate_fd_connect(MigrationState *s, Error *error_in)
qemu_thread_create(&s->thread, "mig/snapshot",
bg_migration_thread, s, QEMU_THREAD_JOINABLE);
} else {
- qemu_thread_create(&s->thread, "mig/src/main",
+ qemu_thread_create(&s->thread, MIGRATION_THREAD_SRC_MAIN,
migration_thread, s, QEMU_THREAD_JOINABLE);
}
s->migration_thread_running = true;
Make pthread name match with what we report in query-migrationthreads. We used to report the same, but not anymore after 60ce47675d ("migration: Rename thread debug names"). Not a huge deal but it was still good to follow. Multifd threads are still matched because at least on the src the QMP facility reused p->name. The QMP command missed dest multifd threads though, but that's another thing to address later. Not copy stable, as we'd better keep the names not changed for stable branches in QMP responses (even though we shouldn't guarantee ABI stability on the names anyway). Cc: Juraj Marcin <jmarcin@redhat.com> Reported-by: Prasad Pandit <ppandit@redhat.com> Signed-off-by: Peter Xu <peterx@redhat.com> --- migration/migration.h | 2 ++ migration/migration.c | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-)