From: Peter Xu <peterx@redhat.com>
To: Trieu Huynh <vikingtc4@gmail.com>
Cc: qemu-devel@nongnu.org, Fabiano Rosas <farosas@suse.de>,
Eric Blake <eblake@redhat.com>,
Markus Armbruster <armbru@redhat.com>
Subject: Re: [PATCH] migration: expose per-device state save times via query-migrate
Date: Thu, 16 Apr 2026 15:21:33 -0400 [thread overview]
Message-ID: <aeE2ve7YrEXHtvrb@x1.local> (raw)
In-Reply-To: <20260416175659.41215-1-viking4@gmail.com>
On Fri, Apr 17, 2026 at 12:56:59AM +0700, Trieu Huynh wrote:
> From: Trieu Huynh <vikingtc4@gmail.com>
>
> The stop-and-copy phase pauses the VM and saves all non-iterable device
> states. qemu_savevm_state_non_iterable() already measures per-device
> elapsed time for tracing (trace_vmstate_downtime_save, added in
> commit 3c80f14272), but this information is never stored or surfaced
> to somewhere.
>
> Expose the result through a new 'device-state-times' list in
> MigrationInfo, filled by qemu_savevm_get_device_state_times() helper
> and returned by query-migrate when status is completed.
>
> A new QAPI type is introduced:
> DeviceSaveStateTime { 'name': 'str', 'instance-id': 'int', 'save-time': 'int' }
> where 'save-time' is the elapsed time in microseconds.
Hi, Trieu,
Thanks again for your patch, especially during your spare time.
Though I need to say this is another example I want to mention, that QMP is
an API that QEMU relies on a lot, and we're serious on what it exposes. We
need to justify whatever new info to be exposed.
So if we start to report something in QAPI, we'd better be very certain at
least someone will be consuming this at the very least. Starting from the
1st day this API got merged, we will need to stick with it and it can be
forever; we can obsolete things, but we need to evaluate risk. Before that
risk analysis, we better evaluate why an API is needed in the first place.
What is much less controversial is, if you could look at how to improve any
of these numbers reported, say, if we can shrink some device save/load
time, that'll always be a performance improvements.
And just to mention Joao's effort was not discontinued and gone, it's just
done instead by tracepoints here rather than QMP queries (before we're more
confident that we can leverage some new data in query-migrate):
https://lore.kernel.org/all/20231030163346.765724-6-peterx@redhat.com/
Thanks,
--
Peter Xu
next prev parent reply other threads:[~2026-04-16 19:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-16 17:56 [PATCH] migration: expose per-device state save times via query-migrate Trieu Huynh
2026-04-16 19:21 ` Peter Xu [this message]
2026-04-17 9:34 ` Trieu Huynh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aeE2ve7YrEXHtvrb@x1.local \
--to=peterx@redhat.com \
--cc=armbru@redhat.com \
--cc=eblake@redhat.com \
--cc=farosas@suse.de \
--cc=qemu-devel@nongnu.org \
--cc=vikingtc4@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.