[{"id":3673747,"web_url":"http://patchwork.ozlabs.org/comment/3673747/","msgid":"<878qb05gq7.fsf@suse.de>","list_archive_url":null,"date":"2026-04-06T14:02:56","subject":"Re: [PATCH 0/2] migration: include timing and RAM stats on\n destination when query-migrate","submitter":{"id":85343,"url":"http://patchwork.ozlabs.org/api/people/85343/","name":"Fabiano Rosas","email":"farosas@suse.de"},"content":"Trieu Huynh <vikingtc4@gmail.com> writes:\n\n> From: Trieu Huynh <vikingtc4@gmail.com>\n>\n> When query-migrate is called on the *destination* QEMU after a precopy\n> migration completes it returns only {\"status\": \"completed\"} — no timing,\n> no RAM statistics.  The source correctly returns total-time, downtime,\n> setup-time, and full ram stats.\n>\n> This series fixes the gap in two commits:\n>\n> * commit 1: Track start/end timestamps and per-page-type counters in\n>   MigrationIncomingState, recorded in the receive path.\n>\n> * commit 2: Make source-only MigrationStats fields optional in the QAPI\n>   schema so the destination can populate info->ram with only the fields\n>   that are meaningful on the receive side.  Fields computed from tracked\n>   counters (transferred, normal, duplicate, mbps, pages-per-second) are\n>   shown; source-only fields (dirty-sync-count, precopy-bytes, etc.) are\n>   absent.\n>\n> The QAPI change (commit 2) is ABI-compatible: optional fields that are\n> not set are simply absent from the output.  Source-side callers are\n> unaffected because populate_ram_info() sets all optional fields via\n> has_* setters, so the source output is identical to before.\n>\n> On dst, {\"execute\":\"query-migrate\"}\n> * As-is:\n> {\n>     \"return\": {\n>         \"status\": \"completed\"\n> }\n> * To-be:\n> {\n>     \"return\": {\n>         \"status\": \"completed\",\n>         \"total-time\": 94,\n>         \"ram\": {\n>             \"total\": 554508288,\n>             \"pages-per-second\": 1440234,\n>             \"page-size\": 4096,\n>             \"remaining\": 0,\n>             \"mbps\": 97.955404255319152,\n>             \"transferred\": 1150976,\n>             \"duplicate\": 135101,\n>             \"normal-bytes\": 1150976,\n>             \"normal\": 281\n>         }\n>     }\n> }\n>\n> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/3151\n>\n> Trieu Huynh (2):\n>   migration: track timing and received pages in MigrationIncomingState\n>   migration: expose RAM stats and timing on destination via\n>     query-migrate\n>\n>  migration/migration.c | 37 +++++++++++++++++++++++++++++++++++++\n>  migration/migration.h | 17 +++++++++++++++++\n>  migration/ram.c       |  3 +++\n>  qapi/migration.json   | 14 +++++++-------\n>  4 files changed, 64 insertions(+), 7 deletions(-)\n\nHi, remember to copy the interested people in your series. Using\nget_maintainers is correct, but when there's already a discussion about\nthe topic it's good to add some CCs manually.\n\n+CC Daniel and Claudio","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256\n header.s=susede2_rsa header.b=0ZAoo4UZ;\n\tdkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256\n header.s=susede2_ed25519 header.b=nnlx9Sz8;\n\tdkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de\n header.a=rsa-sha256 header.s=susede2_rsa header.b=0ZAoo4UZ;\n\tdkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256\n header.s=susede2_ed25519 header.b=nnlx9Sz8;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org\n (client-ip=209.51.188.17; helo=lists.gnu.org;\n envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=patchwork.ozlabs.org)","smtp-out1.suse.de;\n\tnone"],"Received":["from lists.gnu.org (lists.gnu.org [209.51.188.17])\n\t(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fq9z531hyz1xy1\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 07 Apr 2026 00:03:29 +1000 (AEST)","from localhost ([::1] helo=lists1p.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-devel-bounces@nongnu.org>)\n\tid 1w9kXh-0006qt-6O; Mon, 06 Apr 2026 10:03:05 -0400","from eggs.gnu.org ([2001:470:142:3::10])\n by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <farosas@suse.de>) id 1w9kXe-0006qM-7m\n for qemu-devel@nongnu.org; Mon, 06 Apr 2026 10:03:02 -0400","from smtp-out1.suse.de ([2a07:de40:b251:101:10:150:64:1])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)\n (Exim 4.90_1) (envelope-from <farosas@suse.de>) id 1w9kXc-0003jo-D3\n for qemu-devel@nongnu.org; Mon, 06 Apr 2026 10:03:02 -0400","from imap1.dmz-prg2.suse.org (unknown [10.150.64.97])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest\n SHA256)\n (No client certificate requested)\n by smtp-out1.suse.de (Postfix) with ESMTPS id B8EC64DF1C;\n Mon,  6 Apr 2026 14:02:58 +0000 (UTC)","from imap1.dmz-prg2.suse.org (localhost [127.0.0.1])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest\n SHA256)\n (No client certificate requested)\n by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 4CB724A0B0;\n Mon,  6 Apr 2026 14:02:58 +0000 (UTC)","from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167])\n by imap1.dmz-prg2.suse.org with ESMTPSA id NbJhBhK902mqWwAAD6G6ig\n (envelope-from <farosas@suse.de>); Mon, 06 Apr 2026 14:02:58 +0000"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de;\n s=susede2_rsa;\n t=1775484178;\n h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:\n mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=1D9ZZAWMhuYberkTPUAj3hZ53JRnixMT6JeYMoRfAt4=;\n b=0ZAoo4UZH3X47uxjdxfCV4fzjr+1JRoM9JXVZk0ORDctb8szzCx1/ukz4m8Plkkpoa1ZKa\n clcbymIOUBZv8hS3i3k0rD3l4rtDjOEPPjIMNV6fkfIoXaHLHekwv4Bbr5rs7D4ueAOYKr\n C9g0jL7SGkZsspZCZPz8mWqkI+Ykw8Y=","v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de;\n s=susede2_ed25519; t=1775484178;\n h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:\n mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=1D9ZZAWMhuYberkTPUAj3hZ53JRnixMT6JeYMoRfAt4=;\n b=nnlx9Sz8rnFnmdZrtPhiJtZVncupt/kzGDW2X0OqPp64pVAzDhvITw4bsUoOm32ReOjbxt\n bcb/xqo5BEXi23Bw==","v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de;\n s=susede2_rsa;\n t=1775484178;\n h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:\n mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=1D9ZZAWMhuYberkTPUAj3hZ53JRnixMT6JeYMoRfAt4=;\n b=0ZAoo4UZH3X47uxjdxfCV4fzjr+1JRoM9JXVZk0ORDctb8szzCx1/ukz4m8Plkkpoa1ZKa\n clcbymIOUBZv8hS3i3k0rD3l4rtDjOEPPjIMNV6fkfIoXaHLHekwv4Bbr5rs7D4ueAOYKr\n C9g0jL7SGkZsspZCZPz8mWqkI+Ykw8Y=","v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de;\n s=susede2_ed25519; t=1775484178;\n h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:\n mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=1D9ZZAWMhuYberkTPUAj3hZ53JRnixMT6JeYMoRfAt4=;\n b=nnlx9Sz8rnFnmdZrtPhiJtZVncupt/kzGDW2X0OqPp64pVAzDhvITw4bsUoOm32ReOjbxt\n bcb/xqo5BEXi23Bw=="],"From":"Fabiano Rosas <farosas@suse.de>","To":"Trieu Huynh <vikingtc4@gmail.com>, qemu-devel@nongnu.org","Cc":"Trieu Huynh <vikingtc4@gmail.com>, Claudio Fontana <cfontana@suse.de>,\n Peter Xu <peterx@redhat.com>,\n Daniel P. =?utf-8?b?QmVycmFuZ8Op?= <berrange@redhat.com>","Subject":"Re: [PATCH 0/2] migration: include timing and RAM stats on\n destination when query-migrate","In-Reply-To":"<20260405152612.93027-1-viking4@gmail.com>","References":"<20260405152612.93027-1-viking4@gmail.com>","Date":"Mon, 06 Apr 2026 11:02:56 -0300","Message-ID":"<878qb05gq7.fsf@suse.de>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Transfer-Encoding":"quoted-printable","X-Spamd-Result":"default: False [-4.30 / 50.00]; BAYES_HAM(-3.00)[99.99%];\n NEURAL_HAM_LONG(-1.00)[-1.000];\n NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain];\n ARC_NA(0.00)[]; MISSING_XM_UA(0.00)[];\n FREEMAIL_ENVRCPT(0.00)[gmail.com]; RCVD_VIA_SMTP_AUTH(0.00)[];\n RCVD_TLS_ALL(0.00)[]; TO_DN_SOME(0.00)[];\n MIME_TRACE(0.00)[0:+]; FUZZY_RATELIMITED(0.00)[rspamd.com];\n MID_RHS_MATCH_FROM(0.00)[]; RCPT_COUNT_FIVE(0.00)[6];\n FROM_HAS_DN(0.00)[];\n FREEMAIL_CC(0.00)[gmail.com,suse.de,redhat.com];\n FREEMAIL_TO(0.00)[gmail.com,nongnu.org];\n FROM_EQ_ENVFROM(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[];\n RCVD_COUNT_TWO(0.00)[2];\n DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519];\n DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo, suse.de:mid,\n gitlab.com:url]","X-Spam-Score":"-4.30","Received-SPF":"pass client-ip=2a07:de40:b251:101:10:150:64:1;\n envelope-from=farosas@suse.de; helo=smtp-out1.suse.de","X-Spam_score_int":"-20","X-Spam_score":"-2.1","X-Spam_bar":"--","X-Spam_report":"(-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,\n DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001,\n SPF_PASS=-0.001 autolearn=ham autolearn_force=no","X-Spam_action":"no action","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"qemu development <qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<https://lists.nongnu.org/archive/html/qemu-devel>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org"}}]