summary refs log tree commit diff stats
path: root/migration/trace-events
diff options
context:
space:
mode:
authorPeter Xu <peterx@redhat.com>2025-06-13 10:12:13 -0400
committerFabiano Rosas <farosas@suse.de>2025-07-11 10:37:38 -0300
commit28a185204ee9a4dd1b0da38c92f2d9326ca590d5 (patch)
tree50253014cc2ed3d9b0d8e64b1f2e39ca0164a112 /migration/trace-events
parentf07f2a3092b70d407a009dae28b44ecc8fbcffb7 (diff)
downloadfocaccia-qemu-28a185204ee9a4dd1b0da38c92f2d9326ca590d5.tar.gz
focaccia-qemu-28a185204ee9a4dd1b0da38c92f2d9326ca590d5.zip
migration/postcopy: Cache the tid->vcpu mapping for blocktime
Looking up the vCPU index for each fault can be expensive when there're
hundreds of vCPUs.  Provide a cache for tid->vcpu instead with a hash
table, then lookup from there.

When at it, add another counter to record how many non-vCPU faults it gets.
For example, the main thread can also access a guest page that was missing.
These kind of faults are not accounted by blocktime so far.

Reviewed-by: Fabiano Rosas <farosas@suse.de>
Link: https://lore.kernel.org/r/20250613141217.474825-11-peterx@redhat.com
Signed-off-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Fabiano Rosas <farosas@suse.de>
Diffstat (limited to 'migration/trace-events')
-rw-r--r--migration/trace-events3
1 files changed, 1 insertions, 2 deletions
diff --git a/migration/trace-events b/migration/trace-events
index 02cdb6e7cc..9c1f3b7044 100644
--- a/migration/trace-events
+++ b/migration/trace-events
@@ -310,8 +310,7 @@ postcopy_preempt_tls_handshake(void) ""
 postcopy_preempt_new_channel(void) ""
 postcopy_preempt_thread_entry(void) ""
 postcopy_preempt_thread_exit(void) ""
-
-get_mem_fault_cpu_index(int cpu, uint32_t pid) "cpu: %d, pid: %u"
+postcopy_blocktime_tid_cpu_map(int cpu, uint32_t tid) "cpu: %d, tid: %u"
 
 # exec.c
 migration_exec_outgoing(const char *cmd) "cmd=%s"