From: Peter Xu <peterx@redhat.com>
To: qemu-devel@nongnu.org
Cc: Alexey Perevalov <a.perevalov@samsung.com>,
Juraj Marcin <jmarcin@redhat.com>,
"Dr . David Alan Gilbert" <dave@treblig.org>,
Fabiano Rosas <farosas@suse.de>,
Markus Armbruster <armbru@redhat.com>
Subject: Re: [PATCH v2 08/13] migration/postcopy: Report fault latencies in blocktime
Date: Mon, 9 Jun 2025 18:05:16 -0400 [thread overview]
Message-ID: <aEdanIDLjSR4szMo@x1.local> (raw)
In-Reply-To: <20250609191259.9053-9-peterx@redhat.com>
On Mon, Jun 09, 2025 at 03:12:54PM -0400, Peter Xu wrote:
> +static void migration_dump_blocktime(Monitor *mon, MigrationInfo *info)
> +{
> + if (info->has_postcopy_blocktime) {
> + monitor_printf(mon, "Postcopy Blocktime (ms): %" PRIu32 "\n",
> + info->postcopy_blocktime);
> + }
> +
> + if (info->has_postcopy_vcpu_blocktime) {
> + uint32List *item = info->postcopy_vcpu_blocktime;
> + const char *sep = "";
> + int count = 0;
> +
> + monitor_printf(mon, "Postcopy vCPU Blocktime (ms): \n [");
> +
> + while (item) {
> + monitor_printf(mon, "%s%"PRIu32, sep, item->value);
> + item = item->next;
> + /* Each line 10 vcpu results, newline if there's more */
> + sep = ((++count % 10 == 0) && item) ? ",\n " : ", ";
> + }
> + monitor_printf(mon, "]\n");
> + }
> +
> + if (info->has_postcopy_latency) {
> + monitor_printf(mon, "Postcopy Latency (us): %" PRIu64 "\n",
> + info->postcopy_latency);
> + }
> +
> + if (info->has_postcopy_vcpu_latency) {
> + uint64List *item = info->postcopy_vcpu_latency;
> + int count = 0;
> +
> + monitor_printf(mon, "Postcopy vCPU Latencies (us): \n [");
> +
> + while (item) {
> + monitor_printf(mon, "%"PRIu64", ", item->value);
> + item = item->next;
> + /* Each line 10 vcpu results, newline if there's more */
> + if ((++count % 10 == 0) && item) {
> + monitor_printf(mon, "\n ");
> + }
> + }
> + monitor_printf(mon, "\b\b]\n");
In the review of the other series I posted, Markus pointed out we should
avoid using "\b" and suggested a better way. I fixed it there, but I
overlooked I have this similar use case in this series. I'll fix this too
when posting v3 with similar approach.
> + }
> +}
--
Peter Xu
next prev parent reply other threads:[~2025-06-09 22:06 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-09 19:12 [PATCH v2 00/13] migration/postcopy: Blocktime tracking overhaul Peter Xu
2025-06-09 19:12 ` [PATCH v2 01/13] migration: Add option to set postcopy-blocktime Peter Xu
2025-06-09 19:12 ` [PATCH v2 02/13] migration/postcopy: Push blocktime start/end into page req mutex Peter Xu
2025-06-09 19:12 ` [PATCH v2 03/13] migration/postcopy: Drop all atomic ops in blocktime feature Peter Xu
2025-06-09 19:12 ` [PATCH v2 04/13] migration/postcopy: Make all blocktime vars 64bits Peter Xu
2025-06-09 19:12 ` [PATCH v2 05/13] migration/postcopy: Drop PostcopyBlocktimeContext.start_time Peter Xu
2025-06-09 19:12 ` [PATCH v2 06/13] migration/postcopy: Bring blocktime layer to us level Peter Xu
2025-06-09 19:12 ` [PATCH v2 07/13] migration/postcopy: Add blocktime fault counts per-vcpu Peter Xu
2025-06-09 19:12 ` [PATCH v2 08/13] migration/postcopy: Report fault latencies in blocktime Peter Xu
2025-06-09 22:05 ` Peter Xu [this message]
2025-06-09 22:25 ` Peter Xu
2025-06-10 0:08 ` Dr. David Alan Gilbert
2025-06-10 13:39 ` Peter Xu
2025-06-10 13:53 ` Dr. David Alan Gilbert
2025-06-10 14:08 ` Peter Xu
2025-06-09 19:12 ` [PATCH v2 09/13] migration/postcopy: Initialize blocktime context only until listen Peter Xu
2025-06-09 19:12 ` [PATCH v2 10/13] migration/postcopy: Cache the tid->vcpu mapping for blocktime Peter Xu
2025-06-09 19:12 ` [PATCH v2 11/13] migration/postcopy: Cleanup the total blocktime accounting Peter Xu
2025-06-09 19:12 ` [PATCH v2 12/13] migration/postcopy: Optimize blocktime fault tracking with hashtable Peter Xu
2025-06-09 19:12 ` [PATCH v2 13/13] migration/postcopy: blocktime allows track / report non-vCPU faults Peter Xu
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=aEdanIDLjSR4szMo@x1.local \
--to=peterx@redhat.com \
--cc=a.perevalov@samsung.com \
--cc=armbru@redhat.com \
--cc=dave@treblig.org \
--cc=farosas@suse.de \
--cc=jmarcin@redhat.com \
--cc=qemu-devel@nongnu.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).