Improve Linux Perf tool to account for task sleep
summary
Current perf misses samples while a task is sleeping because the hrtimer handler stops on sleep; two kernel-side fixes are proposed and prototyped: calculate missed samples from timestamps and forward counts to perf record/report, or record a dummy sleep sample by logging stop/start times and one backtrace per sleep. POC on a synthetic 10%‑run/90%‑sleep workload changes per-function CPU from ~100% to ~10% and adds explicit sleep time in perf.data, but increases perf.data size and needs perf-report changes.
AI-written summary · about
chapters (10)
- 0:00Introduction to task sleep issue
- 1:50Current perf tool limitations
- 2:56Why perf misses sleep samples
- 9:43Problem with sleep state sampling
- 11:31Proposed solutions overview
- 12:16Solution 1: Capture sleep samples
- 14:49Solution 2: Measure sleep time
- 20:38Results with solution approach
- 21:41Next steps for solution
- 23:57Q&A session begins
related talks
45mPerformance lab. The power of the perf tool!
52mEffectively Measure and Reduce Kernel Latencies for Real-time Constraints
45mPerf tools updates and beyond
59mProposing a new tracer to monitor RT task behavior
55mPerformance tuning of Red Hat Enterprise Linux
32mCPU Power Saving Methods for Real-time Workloads
53mPREEMPT_RT - How Not to Break It.
18mScheduler Tracing With ftrace + eBPF
