Skip to content

migration: query-migrationthreads enhancements and cleanups

Peter Xu qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest7 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7migration: Unify names of migration src main threadmigration/migration.c migration/migration.h+5 -20 replies
2/7migration: Put thread names together with macrosmigration/colo.c migration/dirtyrate.c migration/migration.c +4 more+30 -120 replies
3/7migration: Remove thread_id in migration_threads_add()migration/migration.c migration/multifd.c migration/threadinfo.c +1 more+6 -60 replies
4/7migration: Simplify migration-threads APImigration/migration.c migration/multifd.c migration/threadinfo.c +1 more+20 -130 replies
5/7migration: Add all threads with QMP query-migrationthreadsmigration/colo.c migration/dirtyrate.c migration/migration.c +6 more+40 -140 replies
6/7migration: Remove MigrationThread and threadinfo.hmigration/migration.c migration/multifd.c migration/threadinfo.c +1 more+25 -490 replies
7/7hmp: Add "info migrationthreads"hmp-commands-info.hx include/monitor/hmp.h migration/migration-hmp-cmds.c+39 -01 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/7] migration: query-migrationthreads enhancements and cleanups

Prasad reported a misalignment issue with query-migrationthreads v.s. the recently migration thread name changes. So I prepared patch 1, which will make the main thread on src be named the same way reported either in pthread or QMP query-migrationthreads API.

Then I found quite something missing around query-migrationthreads. E.g., it so far only accounts multifd sender threads, while it ignored too many other kinds of migration threads (either postcopy ones, destination multifd threads, temporary threads etc.). It means even if an admin can get TIDs on src QEMU and does pinning (assuming that was the goal of the original API), it won't be able to do the same for dest QEMUs, which seems to lose its purpose.

HMP is also missing, I added it too, as thread IDs can definitely be good candidates during debugging. If we have QMP ready, it sounds like it should naturally fit the HMP one too.

I did some cleanups here and there all around. Feel free to have a look, thanks.

CI: https://gitlab.com/peterx/qemu/-/pipelines/1475958754

Peter Xu (7):
migration: Unify names of migration src main thread
migration: Put thread names together with macros
migration: Remove thread_id in migration_threads_add()
migration: Simplify migration-threads API
migration: Add all threads with QMP query-migrationthreads
migration: Remove MigrationThread and threadinfo.h
hmp: Add "info migrationthreads"

 include/monitor/hmp.h          |  1 +
 migration/migration.h          | 17 ++++++++++
 migration/threadinfo.h         | 25 --------------
 migration/colo.c               | 10 ++++--
 migration/dirtyrate.c          | 13 ++++++--
 migration/migration-hmp-cmds.c | 25 ++++++++++++++
 migration/migration.c          | 19 ++++++-----
 migration/multifd.c            | 18 ++++++----
 migration/postcopy-ram.c       | 16 ++++++---
 migration/savevm.c             | 13 +++++---
 migration/threadinfo.c         | 61 ++++++++++++++++++++--------------
 hmp-commands-info.hx           | 13 ++++++++
 12 files changed, 150 insertions(+), 81 deletions(-)
 delete mode 100644 migration/threadinfo.h
Signature · 1 line
2.45.0