linux/tools
Ihor Solodrai 0b82cc331d selftests/sched_ext: Fix rt_stall flaky failure
The rt_stall test measures the runtime ratio between an EXT and an RT
task pinned to the same CPU, verifying that the deadline server prevents
RT tasks from starving SCHED_EXT tasks. It expects the EXT task to get
at least 4% of CPU time.

The test is flaky because sched_stress_test() calls sleep(RUN_TIME)
immediately after fork(), without waiting for the RT child to complete
its setup (set_affinity + set_sched). If the RT child experiences
scheduling latency before completing setup, that delay eats into the
measurement window: the RT child runs for less than RUN_TIME seconds,
and the EXT task's measured ratio drops below the 4% threshold.

For example, in the failing CI run [1]:
  EXT=0.140s RT=4.750s total=4.890s (expected ~5.0s)
  ratio=2.86% < 4% → FAIL

The 110ms gap (5.0 - 4.89) corresponds to the RT child's setup time
being counted inside the measurement window, during which fewer
deadline server ticks fire for the EXT task.

Fix by using pipes to synchronize: each child signals the parent after
completing its setup, and the parent waits for both signals before
starting sleep(RUN_TIME). This ensures the measurement window only
counts time when both tasks are fully configured and competing.

[1] https://github.com/kernel-patches/bpf/actions/runs/21961895809/job/63442490449

Fixes: be621a7634 ("selftests/sched_ext: Add test for sched_ext dl_server")
Assisted-by: claude-opus-4-6-v1
Signed-off-by: Ihor Solodrai <ihor.solodrai@linux.dev>
Reviewed-by: Andrea Righi <arighi@nvidia.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
2026-02-13 09:09:39 -10:00
..
accounting
arch - The usual set of cleanups and simplifications all over the tree 2026-02-10 18:43:03 -08:00
bootconfig
bpf resolve_btfids: Refactor the sort_btf_by_name function 2026-02-04 10:17:19 -08:00
build tools build: Fix the common set of features test wrt libopenssl 2025-12-27 20:26:44 -08:00
certs
cgroup
counter
crypto
debugging
dma dma-mapping updates for Linux 6.19: 2025-12-06 09:25:05 -08:00
docs tools: sphinx-build-wrapper: improve its help message 2026-02-02 09:57:46 -07:00
firewire
firmware
gpio
hv
iio
include Updates for the VDSO subsystem: 2026-02-10 17:02:23 -08:00
kvm/kvm_stat
laptop
leds
lib bpf-next-7.0 2026-02-10 11:26:21 -08:00
memory-model
mm tools/mm/page_owner_sort: fix timestamp comparison for stable sorting 2025-12-23 11:23:14 -08:00
net tools: ynltool: add qstats analysis for HW-GRO efficiency / savings 2026-02-09 21:08:32 -08:00
objtool - A nice cleanup to the paravirt code containing a unification of the paravirt 2026-02-10 19:01:45 -08:00
pcmcia
perf Kbuild/Kconfig updates for 7.0 2026-02-11 13:40:35 -08:00
power cpupower: make systemd unit installation optional 2026-01-16 13:41:26 -07:00
rcu
sched
sched_ext tools/sched_ext: scx_userland: fix restart and stats thread lifecycle bugs 2026-02-12 11:17:35 -10:00
scripts tools headers: Sync syscall table with kernel sources 2025-12-24 11:43:36 -08:00
sound
spi spi: tools: Add include folder to .gitignore 2026-02-09 12:27:31 +00:00
testing selftests/sched_ext: Fix rt_stall flaky failure 2026-02-13 09:09:39 -10:00
thermal tools/thermal/thermal-engine: Fix format string bug in thermal-engine 2025-11-25 11:00:28 +01:00
time
tracing rtla updaets for v6.19: 2025-12-05 09:34:01 -08:00
usb
verification
virtio tools/virtio: add device, device_driver stubs 2025-12-24 08:02:56 -05:00
wmi
workqueue
writeback
Makefile