Skip to content

migration: cleanups, fixes and micro-optimizations

Bin Guo qemu-devel 1 version Applied

Status from this message: I queued the rest, thanks.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest8 patches 9 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/8migration/fd: collapse migration_fd_valid into single boolean expressionmigration/fd.c+1 -91 reply
2/8migration/global_state: replace strcpy("") with explicit NUL terminationmigration/global_state.c+1 -11 reply
3/8migration/vmstate: avoid per-element heap churn in vmsd ptr marker fieldmigration/vmstate.c+16 -251 reply
4/8migration/savevm: use stack-allocated bitmap in configuration_validate_capabilitiesmigration/savevm.c+2 -31 reply
5/8migration/multifd: fix off-by-one in recv channel ID validationmigration/multifd.c+3 -31 reply
6/8migration/multifd: merge thread-join and cleanup loops in multifd_recv_cleanupmigration/multifd.c+2 -31 reply
7/8migration/multifd: cache migrate_multifd_channels() in send/recv hot pathsmigration/multifd.c+9 -61 reply
8/8migration/multifd: cache channel count in multifd_send_sync_mainmigration/multifd.c+4 -21 reply

Reviews trailers per patch

6 of 8 patches have a Reviewed-by or Acked-by.

PatchFabiano Rosas
1/8
2/8R-b
3/8R-b
4/8R-b
5/8R-b
6/8
7/8R-b
8/8R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/8] migration: cleanups, fixes and micro-optimizations

This series collects several small improvements to the migration subsystem:

- Bug fix: off-by-one in multifd recv channel ID validation that could allow an out-of-bounds write (patch 5).
- Micro-optimizations: cache migrate_multifd_channels() in hot paths (patches 7-8), use stack-allocated bitmap instead of heap (patch 4), avoid per-element heap churn in vmstate ptr marker field (patch 3).
- Cleanups: collapse migration_fd_valid into a single boolean expression (patch 1), replace strcpy("") with explicit NUL termination (patch 2), merge thread-join and cleanup loops in multifd_recv_cleanup (patch 6).

No functional change intended except for the off-by-one fix in patch 5.

Bin Guo (8):
migration/fd: collapse migration_fd_valid into single boolean
expression
migration/global_state: replace strcpy("") with explicit NUL
termination
migration/vmstate: avoid per-element heap churn in vmsd ptr marker
field
migration/savevm: use stack-allocated bitmap in
configuration_validate_capabilities
migration/multifd: fix off-by-one in recv channel ID validation migration/multifd: merge thread-join and cleanup loops in
multifd_recv_cleanup
migration/multifd: cache migrate_multifd_channels() in send/recv hot
paths
migration/multifd: cache channel count in multifd_send_sync_main

 migration/fd.c           | 10 +---------
 migration/global_state.c |  2 +-
 migration/multifd.c      | 32 +++++++++++++++++--------------
 migration/savevm.c       |  5 ++---
 migration/vmstate.c      | 41 ++++++++++++++++------------------------
 5 files changed, 38 insertions(+), 52 deletions(-)
Signature · 1 line
2.50.1 (Apple Git-155)