]> git.ipfire.org Git - thirdparty/qemu.git/commit
migration/postcopy: blocktime allows track / report non-vCPU faults
authorPeter Xu <peterx@redhat.com>
Fri, 13 Jun 2025 14:12:16 +0000 (10:12 -0400)
committerFabiano Rosas <farosas@suse.de>
Fri, 11 Jul 2025 13:37:39 +0000 (10:37 -0300)
commited23a159763293e84d3562dedd731192b093b808
treefe296e528a7ff933af73bdabc8791b14b4177109
parentb63a2e9e4b6dd779f7a699162ffdafc95e905c80
migration/postcopy: blocktime allows track / report non-vCPU faults

When used to report page fault latencies, the blocktime feature can be
almost useless when KVM async page fault is enabled, because in most cases
such remote fault will kickoff async page faults, then it's not trackable
from blocktime layer.

After all these recent rewrites to blocktime layer, it's finally so easy to
also support tracking non-vCPU faults.  It'll be even faster if we could
always index fault records with TIDs, unfortunately we need to maintain the
blocktime API which report things in vCPU indexes.

Of course this can work not only for kworkers, but also any guest accesses
that may reach a missing page, for example, very likely when in the QEMU
main thread too (and all other threads whenever applicable).

In this case, we don't care about "how long the threads are blocked", but
we only care about "how long the fault will be resolved".

Cc: Markus Armbruster <armbru@redhat.com>
Cc: Dr. David Alan Gilbert <dave@treblig.org>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Tested-by: Mario Casquero <mcasquer@redhat.com>
Link: https://lore.kernel.org/r/20250613141217.474825-14-peterx@redhat.com
Signed-off-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Fabiano Rosas <farosas@suse.de>
migration/migration-hmp-cmds.c
migration/postcopy-ram.c
migration/trace-events
qapi/migration.json
tests/qtest/migration/migration-qmp.c