@samitouri / QOSamiQemu / commits / 60f2281450

migration: clean up postcopy blocktime presentation

Small cleanups for the postcopy blocktime fine-grained tracking feature: * Remove a redundant memset() on latency_buckets after g_new0(). * Use singular "Latency" in the HMP label for postcopy non-vCPU latency, consistent with other single-value labels. Signed-off-by: Bin Guo <guobin@linux.alibaba.com> Link: https://lore.kernel.org/r/20260716101952.65329-4-guobin@linux.alibaba.com Signed-off-by: Peter Xu <peterx@redhat.com>

Bin Guo committed Jul 16, 2026 at 18:19 UTC 60f2281450c4b4e9a16922fd69c66486a8207abb
2 files changed +1 -4
migration/migration-hmp-cmds.c
+1 -1
@@ -95,7 +95,7 @@ static void migration_dump_blocktime(Monitor *mon, MigrationInfo *info)
95 }
96
97 if (info->has_postcopy_non_vcpu_latency) {
98 - monitor_printf(mon, "Postcopy non-vCPU Latencies (ns): %" PRIu64 "\n",
98 + monitor_printf(mon, "Postcopy non-vCPU Latency (ns): %" PRIu64 "\n",
99 info->postcopy_non_vcpu_latency);
100 }
101
migration/postcopy-ram.c
-3
@@ -297,9 +297,6 @@ static struct PostcopyBlocktimeContext *blocktime_context_new(void)
297 unsigned int smp_cpus = ms->smp.cpus;
298 PostcopyBlocktimeContext *ctx = g_new0(PostcopyBlocktimeContext, 1);
299
300 - /* Initialize all counters to be zeros */
301 - memset(ctx->latency_buckets, 0, sizeof(ctx->latency_buckets));
302 -
300 ctx->vcpu_blocktime_total = g_new0(uint64_t, smp_cpus);
301 ctx->vcpu_faults_count = g_new0(uint64_t, smp_cpus);
302 ctx->vcpu_faults_current = g_new0(uint8_t, smp_cpus);