Host & Guest Tracing in Virtualization: "To sync, or not to sync?"
summary
Implements host↔guest trace collection in trace-cmd 2.9 using vSockets (optionally FIFOs on KVM) and visualizes merged traces in KernelShark 2.0; synchronizes timestamps either via a PTP‑like packet exchange (needs ~500 exchanges to mitigate CPU preemption) or by reading KVM’s exposed TSC offset/rate from debugfs. Evaluates with 30×20s sessions producing ~8,000 samples for timer sequences and ~3,000 for idle sequences; results show KVM debugfs TSC offset gives far lower mean and standard deviation than PTP‑like synchronization, so KVM is more accurate but less portable.
AI-written summary · about
chapters (17)
- 0:00Intro
- 0:58Ftrace
- 1:39Host-Guest kernel tracing
- 3:09Trace data transfer
- 5:02Time stamps synchronisation - PTP
- 8:31Tools & Libraries
- 9:45Verifying the results
- 10:19Validation: kvm_entry & kvm_exit events
- 10:44Validation: what we expect?
- 11:26Time-sync accuracy evaluation: an event-based approa
- 12:10First set: hrtimer & MSR events
- 13:44Second set: idle task & HLT events
- 15:48Let's automate it: final tool
- 17:08PTP vs KVM: analysis
- 17:49PTP vs KVM: evaluation
- 18:54Conclusion
- 19:57Links & Acknowledgments
related talks
39mTracing VMs Seeing How Host and Guest Interact
41mSynthetic Events and Tracing Latency Within the Kernel
12mStriaTrace: Efficient Tracing and Diagnosis for Online LLM Inference
37mKernel and userspace tracing with LTTng and friends
43mEfficient Performance Profiling for Virtual Machines
49mAdding Inter-event Capabilities to Linux Kernel Trace Events
52mTracking Down What Happened: A Comparison of Tracing Solutions
25mPerfect Match: Correlating Continuous Profiling with Distributed Tracing for Stronger Observability
