stalld, the Linux task starvation daemon used in real-time and HPC environments, has replaced its fragile debugfs-based polling backend with a new BPF-powered event-driven backend called queue_track. The old approach read and parsed /sys/kernel/debug/sched/debug text output, requiring multiple version-specific parsers and missing short-lived starvation events. The new backend attaches BPF programs to scheduler tracepoints (sched_wakeup, sched_switch, sched_process_exit, sched_migrate_task) to track task runqueue wait times in real time, storing data in BPF maps for efficient user-space consumption. BPF CO-RE (compile once, run everywhere) handles kernel struct layout differences across versions automatically, eliminating the need for conditional compilation. The queue_track backend is now the default on x86_64, aarch64, s390x, riscv64, and ppc64le, removes the debugfs dependency, works on Secure Boot/locked-down systems, and delivers near-zero overhead with no missed events.

12m read timeFrom developers.redhat.com
Post cover image
Table of contents
What is stalld?The old way: The sched_debug backendThe new way: The BPF queue_track backendPractical usagePerformance comparisonConclusion
3.9K Impressions