Skip to content

stalld: Improve legacy kernel support and unify sched_debug parsing

Derek Barbosa linux-rt-users 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 15 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3sched_debug: Unify parsing methods for task_infosrc/sched_debug.c src/sched_debug.h+244 -2260 replies
2/3Makefile: Add support for legacy kernelsMakefile src/stalld.c+43 -314 replies
3/3scripts: fix run-local if bashismscripts/run-local.sh+1 -11 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] stalld: Improve legacy kernel support and unify sched_debug parsing

This patch series enhances stalld's compatibility with legacy 3.X kernels and improves the robustness of the sched_debug backend parsing logic.

The main improvements include:

1. Consolidates the OLD and NEW task format parsing logic into a single, more maintainable implementation. The new parser uses field offset detection to handle different kernel versions' varying sched_debug output formats, eliminating code duplication and improving reliability across kernel versions.

2. Legacy kernel build support: Adds automatic detection of 3.X kernels in the Makefile and configures appropriate build flags. This includes disabling eBPF support (unavailable on legacy kernels), removing Intel CET protection flags, and defaulting to the sched_debug backend instead of the queue_track backend.

3. Shell compatibility fix: Corrects a bash syntax issue in the run-local script that prevented execution on older bash versions (4.2.X) commonly found on legacy systems.

Clark Williams (1):
sched_debug: Unify parsing methods for task_info

Derek Barbosa (2):
Makefile: Add support for legacy kernels
scripts: fix run-local if bashism

 Makefile             |  40 ++++-
 scripts/run-local.sh |   2 +-
 src/sched_debug.c    | 405 +++++++++++++++++++------------------------
 src/sched_debug.h    |  65 ++++++-
 src/stalld.c         |   6 +-
 5 files changed, 288 insertions(+), 230 deletions(-)

--
2.50.0