All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] migration: include timing and RAM stats on destination when query-migrate
@ 2026-04-05 15:26 Trieu Huynh
  2026-04-05 15:26 ` [PATCH 1/2] migration: track timing and received pages in MigrationIncomingState Trieu Huynh
                   ` (2 more replies)
  0 siblings, 3 replies; 20+ messages in thread
From: Trieu Huynh @ 2026-04-05 15:26 UTC (permalink / raw)
  To: qemu-devel; +Cc: Trieu Huynh

From: Trieu Huynh <vikingtc4@gmail.com>

When query-migrate is called on the *destination* QEMU after a precopy
migration completes it returns only {"status": "completed"} — no timing,
no RAM statistics.  The source correctly returns total-time, downtime,
setup-time, and full ram stats.

This series fixes the gap in two commits:

* commit 1: Track start/end timestamps and per-page-type counters in
  MigrationIncomingState, recorded in the receive path.

* commit 2: Make source-only MigrationStats fields optional in the QAPI
  schema so the destination can populate info->ram with only the fields
  that are meaningful on the receive side.  Fields computed from tracked
  counters (transferred, normal, duplicate, mbps, pages-per-second) are
  shown; source-only fields (dirty-sync-count, precopy-bytes, etc.) are
  absent.

The QAPI change (commit 2) is ABI-compatible: optional fields that are
not set are simply absent from the output.  Source-side callers are
unaffected because populate_ram_info() sets all optional fields via
has_* setters, so the source output is identical to before.

On dst, {"execute":"query-migrate"}
* As-is:
{
    "return": {
        "status": "completed"
}
* To-be:
{
    "return": {
        "status": "completed",
        "total-time": 94,
        "ram": {
            "total": 554508288,
            "pages-per-second": 1440234,
            "page-size": 4096,
            "remaining": 0,
            "mbps": 97.955404255319152,
            "transferred": 1150976,
            "duplicate": 135101,
            "normal-bytes": 1150976,
            "normal": 281
        }
    }
}

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/3151

Trieu Huynh (2):
  migration: track timing and received pages in MigrationIncomingState
  migration: expose RAM stats and timing on destination via
    query-migrate

 migration/migration.c | 37 +++++++++++++++++++++++++++++++++++++
 migration/migration.h | 17 +++++++++++++++++
 migration/ram.c       |  3 +++
 qapi/migration.json   | 14 +++++++-------
 4 files changed, 64 insertions(+), 7 deletions(-)

-- 
2.43.0



^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2026-04-23 13:23 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-05 15:26 [PATCH 0/2] migration: include timing and RAM stats on destination when query-migrate Trieu Huynh
2026-04-05 15:26 ` [PATCH 1/2] migration: track timing and received pages in MigrationIncomingState Trieu Huynh
2026-04-07 12:02   ` Claudio Fontana
2026-04-07 12:11     ` Claudio Fontana
2026-04-07 18:28       ` Trieu Huynh
2026-04-05 15:26 ` [PATCH 2/2] migration: expose RAM stats and timing on destination via query-migrate Trieu Huynh
2026-04-08 16:14   ` Claudio Fontana
2026-04-08 19:38     ` Trieu Huynh
2026-04-06 14:02 ` [PATCH 0/2] migration: include timing and RAM stats on destination when query-migrate Fabiano Rosas
2026-04-08 20:04   ` Peter Xu
2026-04-09 10:08     ` Claudio Fontana
2026-04-09 13:08       ` Fabian Grünbichler
2026-04-09 13:17         ` Claudio Fontana
2026-04-09 13:29           ` Fabian Grünbichler
2026-04-13 21:07       ` Peter Xu
2026-04-16 16:53         ` Trieu Huynh
2026-04-16 18:50           ` Peter Xu
2026-04-17 10:01             ` Trieu Huynh
2026-04-22 22:46         ` Fabiano Rosas
2026-04-23 13:22           ` Peter Xu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.