Skip to content

migration: Add COLO multifd support and COLO migration unit test

Lukas Straub qemu-devel 15 versions – In review

Get series with b4
b4 am [email protected] change-id 20251230-colo_unit_test_multifd-8bf58dcebd46

Versions newest first

  1. v11 Latest posting 5/521 patches 10 repliesIn review
  2. v11 posting 4/519 of 21 patches 0 repliesSuperseded
  3. v11 posting 3/521 patches 0 repliesSuperseded
Earlier versions · 12
VersionPostedPatchesRepliesStatus
v11 posting 2/519 of 21 patches0 repliesSuperseded
v11 posting 1/519 of 21 patches0 repliesSuperseded
v1019 patches7 repliesSuperseded
v919 patches3 repliesSuperseded
v817 patches5 repliesApplied
v718 patches0 repliesSuperseded
v618 patches3 repliesSuperseded
v516 patches16 repliesSuperseded
v416 patches10 repliesSuperseded
v310 patches26 repliesSuperseded
v28 patches17 repliesSuperseded
v13 patches13 repliesSuperseded

Changes in v11 from the cover letter

- Use colo with return-path capability
- Link to v10: https://lore.kernel.org/qemu-devel/[email protected]

Patches in v11 posting 5/5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/21MAINTAINERS: Add myself as maintainer for COLO migration frameworkMAINTAINERS+1 -00 replies
2/21MAINTAINERS: Remove Hailiang Zhang from COLO migration frameworkMAINTAINERS+0 -11 reply
3/21colo: Setup ram cache in normal migration pathmigration/migration.c migration/savevm.c+15 -170 replies
4/21colo: Replace migration_incoming_colo_enabled() with migrate_colo()include/migration/colo.h migration/colo.c migration/migration.c +1 more+4 -100 replies
5/21colo: Remove ENABLE_COLO savevm command and mark it as deprecatedinclude/migration/colo.h migration/migration.c migration/savevm.c +2 more+5 -550 replies
6/21ram: Remove colo special-casingmigration/ram.c+5 -50 replies
7/21multifd: Move ram state receive into multifd_ram_state_recv()migration/multifd.c+10 -10 replies
8/21multifd: Add COLO supportMAINTAINERS migration/meson.build migration/multifd-colo.c +4 more+93 -30 replies
9/21Call colo_release_ram_cache() after multifd threads terminatemigration/colo.c migration/migration.c+3 -30 replies
10/21colo: Fix crash during device vmstate loadmigration/colo.c+6 -00 replies
11/21colo: Hold the BQL while sending ram statemigration/colo.c+2 -20 replies
12/21colo: Do not hold the BQL while receiving ram state.migration/colo.c+2 -40 replies
13/21migration-test: Add COLO migration unit testMAINTAINERS tests/qtest/meson.build tests/qtest/migration-test.c +2 more+211 -14 replies
14/21Convert colo main documentation to restructuredTextMAINTAINERS docs/COLO-FT.txt docs/system/index.rst +1 more+362 -3350 replies
15/21qemu-colo.rst: Miscellaneous changesdocs/system/qemu-colo.rst+18 -170 replies
16/21qemu-colo.rst: Add my copyrightdocs/system/qemu-colo.rst+1 -00 replies
17/21qemu-colo.rst: Simplify the block replication setupdocs/system/qemu-colo.rst+7 -70 replies
18/21multifd: Fix hang if send thread errors during syncmigration/multifd.c+6 -10 replies
19/21colo: Use file lock in primary_vm_do_failover()migration/colo.c+7 -51 reply
20/21migration: Keep s->rp_state.from_dst_file open until migration endsmigration/migration.c+12 -71 reply
21/21colo: Reuse the return path from migration on primary and secondary sidedocs/system/qemu-colo.rst migration/colo.c migration/options.c +2 more+34 -201 reply

Reviews trailers per patch

All 21 patches have a Reviewed-by or Acked-by.

PatchFabiano RosasPeter XuZhang Chen
1/21R-b R-b
2/21R-b R-b
3/21R-b R-b
4/21R-b R-b
5/21R-b R-b
6/21R-b R-b
7/21R-b R-b
8/21R-b R-b
9/21R-b R-b
10/21R-b
11/21R-b
12/21R-b
13/21R-b T-b R-b
14/21R-b R-b
15/21R-b R-b
16/21R-b R-b
17/21R-b
18/21R-b
19/21R-b
20/21R-b
21/21R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v11 thread

Cover letter [PATCH v11 00/21] migration: Add COLO multifd support and COLO migration unit test

Screw b4, I'm back to git send-email again. Also screw my email provider black-box.

Hello everyone,
This has some cleanups for and adds multifd support and migration unit tests for COLO migration.

Regards,
Lukas

---
Changes in v11:
- Use colo with return-path capability
- Link to v10: https://lore.kernel.org/qemu-devel/[email protected]

Changes in v10:
- multifd: always kick the main thread
- always open the return path socket on source
- Link to v9: https://lore.kernel.org/qemu-devel/[email protected]

Changes in v9:
- Rebase onto master
- Fix two rare bugs discovered during sresstesting the colo unit test
- Link to v8: https://lore.kernel.org/qemu-devel/[email protected]

Changes in v8:
- Fix peter's review comments
- Link to v7: https://lore.kernel.org/qemu-devel/[email protected]

Changes in v7:
- Fix peter's review comments
- Link to v6: https://lore.kernel.org/qemu-devel/[email protected]

Changes in v6:
- Fix the crash when running COLO with TCG accel.
- Link to v5: https://lore.kernel.org/qemu-devel/[email protected]

Changes in v5:
- Remove unused inmports from multifd-colo.c
- Mention the checkpoint overhead of reset to the Q35 fix
- Link to v4: https://lore.kernel.org/qemu-devel/[email protected]

Changes in v4:
- Add cleanup patches to remove migration_incoming_colo_enabled() and MIG_CMD_ENABLE_COLO
- Add more comments to the colo unit test
- Call colo_release_ram_cache() after multifd threads terminate
- Link to v3: https://lore.kernel.org/qemu-devel/[email protected]

Changes in v3:
- Fix peter's review comments.
- Fix COLO with Q35 machine
- Link to v2: https://lore.kernel.org/qemu-devel/[email protected]

Changes in v2:
- Fix review comments
- Hide stderr in colo migration test since the logged errors are expected
- Add benchmarking data for multifd
- Add myself as maintainer for COLO migration framework
- Link to v1: https://lore.kernel.org/qemu-devel/[email protected]

---
Lukas Straub (21):
MAINTAINERS: Add myself as maintainer for COLO migration framework
MAINTAINERS: Remove Hailiang Zhang from COLO migration framework
colo: Setup ram cache in normal migration path
colo: Replace migration_incoming_colo_enabled() with migrate_colo()
colo: Remove ENABLE_COLO savevm command and mark it as deprecated
ram: Remove colo special-casing
multifd: Move ram state receive into multifd_ram_state_recv()
multifd: Add COLO support
Call colo_release_ram_cache() after multifd threads terminate
colo: Fix crash during device vmstate load
colo: Hold the BQL while sending ram state
colo: Do not hold the BQL while receiving ram state.
migration-test: Add COLO migration unit test
Convert colo main documentation to restructuredText qemu-colo.rst: Miscellaneous changes
qemu-colo.rst: Add my copyright
qemu-colo.rst: Simplify the block replication setup
multifd: Fix hang if send thread errors during sync
colo: Use file lock in primary_vm_do_failover()
migration: Keep s->rp_state.from_dst_file open until migration ends
colo: Reuse the return path from migration on primary and secondary side

 MAINTAINERS                        |   6 +-
 docs/COLO-FT.txt                   | 334 ----------------------------------
 docs/system/index.rst              |   1 +
 docs/system/qemu-colo.rst          | 362 +++++++++++++++++++++++++++++++++++++
 include/migration/colo.h           |   3 -
 migration/colo.c                   |  59 +++---
 migration/meson.build              |   2 +-
 migration/migration.c              |  80 ++++----
 migration/multifd-colo.c           |  44 +++++
 migration/multifd-colo.h           |  26 +++
 migration/multifd-nocomp.c         |  10 +-
 migration/multifd.c                |  26 ++-
 migration/multifd.h                |   5 +-
 migration/options.c                |  10 +-
 migration/ram.c                    |  12 +-
 migration/savevm.c                 |  37 +---
 migration/savevm.h                 |   1 -
 migration/trace-events             |   1 -
 tests/qtest/meson.build            |   7 +-
 tests/qtest/migration-test.c       |   1 +
 tests/qtest/migration/colo-tests.c | 199 ++++++++++++++++++++
 tests/qtest/migration/framework.c  |  13 ++
 tests/qtest/migration/framework.h  |   5 +
 23 files changed, 777 insertions(+), 467 deletions(-)

---
base-commit: d8a9d97317d03190b34498741f98f22e2a9afe3e
change-id: 20251230-colo_unit_test_multifd-8bf58dcebd46

Best regards,

Signature · 1 line
Lukas Straub <[email protected]>