OSDN Git Service

migration: Add per vmstate downtime tracepoints
authorPeter Xu <peterx@redhat.com>
Mon, 30 Oct 2023 16:33:44 +0000 (12:33 -0400)
committerJuan Quintela <quintela@redhat.com>
Wed, 1 Nov 2023 15:13:58 +0000 (16:13 +0100)
commit3c80f14272057f77c87fb9971e8c4f603a03289a
tree8be7206d4739153ebdcc61d91f20511c2afd1192
parente22ffad03a32d3fc4717561f8af5ef7d9657728d
migration: Add per vmstate downtime tracepoints

We have a bunch of savevm_section* tracepoints, they're good to analyze
migration stream, but not always suitable if someone would like to analyze
the migration downtime.  Two major problems:

  - savevm_section* tracepoints are dumping all sections, we only care
    about the sections that contribute to the downtime

  - They don't have an identifier to show the type of sections, so no way
    to filter downtime information either easily.

We can add type into the tracepoints, but instead of doing so, this patch
kept them untouched, instead of adding a bunch of downtime specific
tracepoints, so one can enable "vmstate_downtime*" tracepoints and get a
full picture of how the downtime is distributed across iterative and
non-iterative vmstate save/load.

Note that here both save() and load() need to be traced, because both of
them may contribute to the downtime.  The contribution is not a simple "add
them together", though: consider when the src is doing a save() of device1
while the dest can be load()ing for device2, so they can happen
concurrently.

Tracking both sides make sense because device load() and save() can be
imbalanced, one device can save() super fast, but load() super slow, vice
versa.  We can't figure that out without tracing both.

Signed-off-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-ID: <20231030163346.765724-4-peterx@redhat.com>
migration/savevm.c
migration/trace-events