From: Peter Xu <peterx@redhat.com>
To: qemu-devel@nongnu.org
Cc: Prasad Pandit <ppandit@redhat.com>,
Julia Suvorova <jusual@redhat.com>,
Markus Armbruster <armbru@redhat.com>,
peterx@redhat.com, Fabiano Rosas <farosas@suse.de>,
Juraj Marcin <jmarcin@redhat.com>,
"Dr . David Alan Gilbert" <dave@treblig.org>
Subject: [PATCH 1/7] migration: Unify names of migration src main thread
Date: Mon, 30 Sep 2024 15:58:31 -0400 [thread overview]
Message-ID: <20240930195837.825728-2-peterx@redhat.com> (raw)
In-Reply-To: <20240930195837.825728-1-peterx@redhat.com>
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(-)
diff --git a/migration/migration.h b/migration/migration.h
index 38aa1402d5..519455796d 100644
--- a/migration/migration.h
+++ b/migration/migration.h
@@ -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)
diff --git a/migration/migration.c b/migration/migration.c
index ae2be31557..505b62c8f3 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -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;
--
2.45.0
next prev parent reply other threads:[~2024-09-30 20:00 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-30 19:58 [PATCH 0/7] migration: query-migrationthreads enhancements and cleanups Peter Xu
2024-09-30 19:58 ` Peter Xu [this message]
2024-09-30 19:58 ` [PATCH 2/7] migration: Put thread names together with macros Peter Xu
2024-09-30 19:58 ` [PATCH 3/7] migration: Remove thread_id in migration_threads_add() Peter Xu
2024-09-30 19:58 ` [PATCH 4/7] migration: Simplify migration-threads API Peter Xu
2024-09-30 19:58 ` [PATCH 5/7] migration: Add all threads with QMP query-migrationthreads Peter Xu
2024-09-30 19:58 ` [PATCH 6/7] migration: Remove MigrationThread and threadinfo.h Peter Xu
2024-09-30 19:58 ` [PATCH 7/7] hmp: Add "info migrationthreads" Peter Xu
2024-09-30 23:43 ` Dr. David Alan Gilbert
2024-10-01 5:46 ` [PATCH 0/7] migration: query-migrationthreads enhancements and cleanups Markus Armbruster
2024-10-01 14:25 ` Daniel P. Berrangé
2024-10-01 15:06 ` Peter Xu
2024-10-02 5:58 ` Markus Armbruster
2024-10-10 19:46 ` Peter Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240930195837.825728-2-peterx@redhat.com \
--to=peterx@redhat.com \
--cc=armbru@redhat.com \
--cc=dave@treblig.org \
--cc=farosas@suse.de \
--cc=jmarcin@redhat.com \
--cc=jusual@redhat.com \
--cc=ppandit@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).