All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Fabian Grünbichler" <f.gruenbichler@proxmox.com>
To: Claudio Fontana <cfontana@suse.de>,
	Fabiano Rosas <farosas@suse.de>, Peter Xu <peterx@redhat.com>
Cc: "Daniel P. Berrangé" <berrange@redhat.com>,
	"Jim Fehlig" <jfehlig@suse.com>,
	qemu-devel@nongnu.org, "Trieu Huynh" <vikingtc4@gmail.com>,
	"Fiona Ebner" <f.ebner@proxmox.com>
Subject: Re: [PATCH 0/2] migration: include timing and RAM stats on destination when query-migrate
Date: Thu, 09 Apr 2026 15:08:07 +0200	[thread overview]
Message-ID: <1775739757.quazquvuzm.astroid@yuna.none> (raw)
In-Reply-To: <5f29c2dd-95eb-44c6-b22e-1909f7453cdf@suse.de>

On April 9, 2026 12:08 pm, Claudio Fontana wrote:
> On 4/8/26 22:04, Peter Xu wrote:
>> On Mon, Apr 06, 2026 at 11:02:56AM -0300, Fabiano Rosas wrote:
>>> Trieu Huynh <vikingtc4@gmail.com> writes:
>>>
>>>> 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.

>>>> [..]
>>>>
>>>
>>> Hi, remember to copy the interested people in your series. Using
>>> get_maintainers is correct, but when there's already a discussion about
>>> the topic it's good to add some CCs manually.
>>>
>>> +CC Daniel and Claudio
>> 
>> The request is a valid one.  Said that, redo accounting on both sides seem
>> to be a duplicated work and overkill to me, if src has everything.
>> 
>> Is there a way we can make Libvirt always query the results before src dies
>> and report it somewhere?  I recall these info were captured somewhere, do
>> we at least dump them into logs?
>> 
>> Thanks,
>> 
> 
> I am interested in the outcome, but I think the approach shown here is fine, the amount of duplication seems minimal to me.
> 
> That said if we _have_ to keep libvirt in the picture, I think I see a possible alternative, but then the feature is not available to anyone that does not use libvirt. At the same time, if libvirt is not used, one is free to keep source QEMU alive and query the stats, like I think Proxmox does.

that is correct, we call query-migrate in a loop while migrating both to
log progress and to manage migration parameters, and manually switch
execution and ownership over to the target node once the migration has
converged:

https://git.proxmox.com/?p=qemu-server.git;a=blob;f=src/PVE/QemuMigrate.pm;h=f7ec322770a47dcc8b89109ecfa6f15ea140f30f;hb=HEAD#l1423

> So with libvirt, I think we need a way to tell libvirt to keep the source QEMU alive before the actual switchover and the source QEMU is destroyed,
> so that we can do everything that needs to be done from the platform layer before the source QEMU is lost.
> It might go beyond querying for stats using QEMU and libvirt.
> 
> Something similar to (and potentially combined with) virDomainMigrateFlags VIR_MIGRATE_PAUSE, for example:
> 
> VIR_MIGRATE_NO_SOURCE_SHUTOFF
> 
> So one might say:
> 
> flags = VIR_MIGRATE_LIVE | VIR_MIGRATE_PERSIST_DEST | VIR_MIGRATE_UNDEFINE_SOURCE | VIR_MIGRATE_PAUSE | VIR_MIGRATE_NO_SOURCE_SHUTOFF
> new_domain = virDomainMigrate3(old_domain, conn, params, nparams, flags)
> 
> and then we could do everything that needs to be done from the platform layer,
> then issue a virDomainResume to start the domain on destination,
> and maybe a virDomainDestroyFlags on the original domain to terminate it on the source.
> 
> But I would still favor the simplicity and the overall applicability of this series from Trieu Huynh.
> 
> Thanks,
> 
> Claudio
> 
> 
> 



  reply	other threads:[~2026-04-09 13:09 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

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=1775739757.quazquvuzm.astroid@yuna.none \
    --to=f.gruenbichler@proxmox.com \
    --cc=berrange@redhat.com \
    --cc=cfontana@suse.de \
    --cc=f.ebner@proxmox.com \
    --cc=farosas@suse.de \
    --cc=jfehlig@suse.com \
    --cc=peterx@redhat.com \
    --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.