Efficient Performance Profiling for Virtual Machines
Talkat Open Source Summit India 2026 · on Tuesday, 2026-06-16· at 17:40· Lotus Ballroom 3 (Level 3)·
summary
Mediated PMU in KVM (merged in Linux 7.0 mediated PMU) gives guests direct access to hardware PMU registers with mutual exclusion so profiling accuracy matches bare metal while cutting VM exits dramatically — a top‑down example shows 74→22 VM exits and a periodic dashboard case shows 49→6 VM exits. Trade-offs: hypervisor must do PMU save/restore on VM entry/exit (some CPU generations offload this) and the host loses perf snooping of guest workloads.
AI-written summary · about
chapters (22)
- 0:00Introduction
- 1:50Hardware counters in Linux
- 4:38Perf event subsystem
- 7:05Profiling KVM guests
- 11:22Mediated PMU for KVM
- 14:51Mediated PMU benefits
- 18:49Mediated PMU trade-offs
- 20:14Future optimizations
- 21:59Development journey
- 23:22Q&A
- 23:47WSL profiling reliability
- 26:17Mediated PMU status
- 27:04Tracing atomic ops in KVM
- 28:49Counter allocation in guests
- 30:14Mediated PMU for ARM/RISC-V
- 31:37Multi-guest performance impact
- 32:37Nested virtualization status
- 34:00Mediated PMU hardware needs
- 36:31Perf KVM and confidential compute
- 37:57Counter encryption security
- 38:17NMI watchdog trade-offs
- 40:49Host-guest counter partitioning
related talks
29mPerf Support in Xen
22mEnhancing RISC-V Performance Analysis Infrastructure
33mCPU Hardware Counters
37mAdvanced Performance Profiling Using Perf Tools
44mThink Outside the VM: Unobtrusive Performance Measurement
39mTracing VMs Seeing How Host and Guest Interact
20mHost & Guest Tracing in Virtualization: "To sync, or not to sync?"
38mAdvanced BPF profiling techniques: how to escape the curse of NMI and fetch ELF...
