mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
migration: Put thread names together with macros
Keep migration thread names together, so it's easier to see a list of all possible migration threads. Still two functional changes below besides the macro defintions: - There's one dirty rate thread that we overlooked before, now we add that too and name it as "mig/dirtyrate" following the old rules. - The old name "mig/src/rp-thr" has "-thr" but it may not be useful if it's a thread name anyway, while "rp" can be slightly hard to read. Taking this chance to rename it to "mig/src/return", hopefully a better name. Reviewed-by: Fabiano Rosas <farosas@suse.de> Acked-by: Hyman Huang <yong.huang@smartx.com> Reviewed-by: Zhang Chen <chen.zhang@intel.com> Link: https://lore.kernel.org/r/20241011153652.517440-1-peterx@redhat.com Signed-off-by: Peter Xu <peterx@redhat.com>
This commit is contained in:
parent
6dd4f44c4f
commit
e620b1e477
7 changed files with 34 additions and 13 deletions
|
@ -2484,7 +2484,7 @@ static int open_return_path_on_source(MigrationState *ms)
|
|||
|
||||
trace_open_return_path_on_source();
|
||||
|
||||
qemu_thread_create(&ms->rp_state.rp_thread, "mig/src/rp-thr",
|
||||
qemu_thread_create(&ms->rp_state.rp_thread, MIGRATION_THREAD_SRC_RETURN,
|
||||
source_return_path_thread, ms, QEMU_THREAD_JOINABLE);
|
||||
ms->rp_state.rp_thread_created = true;
|
||||
|
||||
|
@ -3473,7 +3473,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();
|
||||
|
||||
|
@ -3823,10 +3824,10 @@ void migrate_fd_connect(MigrationState *s, Error *error_in)
|
|||
}
|
||||
|
||||
if (migrate_background_snapshot()) {
|
||||
qemu_thread_create(&s->thread, "mig/snapshot",
|
||||
qemu_thread_create(&s->thread, MIGRATION_THREAD_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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue