Skip to content

migration: cleanups, fixes and micro-optimizations

Bin Guo qemu-devel 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 of 8 patches 0 repliesNew

3 of 8 patches are in this archive. The cover letter announces 8.

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8migration/fd: collapse migration_fd_valid into single boolean expressionmigration/fd.c+1 -90 replies
2/8migration/global_state: replace strcpy("") with explicit NUL terminationmigration/global_state.c+1 -10 replies
3/8migration/vmstate: avoid per-element heap churn in vmsd ptr marker fieldmigration/vmstate.c+16 -250 replies

Reviews trailers per patch

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

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)