perf_sched_latency
Identify tasks suffering scheduling starvation by analyzing per-task max, average, and total latency from perf.data.
Instructions
Per-task scheduling latency statistics. Shows max, average, and total scheduling delay per task.
Use this to identify tasks that are being starved or experiencing long scheduling delays.
Key parameters:
sort: sort key -- 'max' (default), 'switch', 'runtime', 'avg'.
pid: filter to specific PIDs.
Output: table with task name, max latency, avg latency, switch count. Requires: perf sched record.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cpu | No | CPUs to filter | |
| pid | No | Analyze only these PIDs | |
| tid | No | Only these TIDs | |
| prio | No | Filter by task priority | |
| sort | No | Sort by key(s): max,switch,runtime,avg | |
| force | No | Don't complain, do it | |
| input | Yes | Path to perf.data file | |
| symfs | No | Symbol filesystem root | |
| output | No | Output file path | |
| repeat | No | Number of times to repeat | |
| verbose | No | Verbosity level (0-2) | |
| vmlinux | No | vmlinux pathname | |
| kallsyms | No | kallsyms pathname | |
| dump_raw_trace | No | Dump raw trace in ASCII |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |