Re: [PATCH v8 05/33] selftests/sched: Test SCHED_DEADLINE bandwidth across a root domain rebuild
From: Mathieu Desnoyers
Date: Fri Nov 20 2026 - 08:49:49 EST
> Can snprintf() truncate path[] here and trigger a -Wformat-truncation
> warning when make_partition() is inlined with cg_p or cg_q (which are
> sized PATH_MAX)?
Our builds give no warning. v9 will size path[] as main() does anyway.
> If the test runner is killed by a signal or kselftest timeout while
> children from departing() or sleeper() are alive, will those children stay
> blocked in pause() inside cg_p holding SCHED_DEADLINE bandwidth and
> preventing cg_p from being removed?
Yes. In v9, each child will first set PR_SET_PDEATHSIG to SIGKILL. It
will exit if the test died before that.
> If make_partition(cg_q, ncpus - 2) in test_rebuild() or enter(cg_p, pid)
> in test_move() fails after departed() has succeeded, does jumping directly
> to out skip waiting for the departed task's 0-lag inactive timer?
Yes. In v9, both cases will wait past the 0-lag time on their way out,
once the deadline task has run.
> Can picking CPUs ncpus - 1 and ncpus - 2 from get_nprocs() fail when
> online CPU numbering has gaps or when isolcpus=domain is configured?
In part. With isolcpus=domain,6,7 on 8 CPUs, the test picked CPUs 7 and
6. It then skipped its three cases. That loses coverage, but fails
nothing. set_deadline() does not fail in test_move(). A task of the root
cgroup is in the housekeeping root domain. The span of that root domain
is inside the mask of the task. test_move() passes with
isolcpus=domain,0,1.
v9 will take the two highest online CPUs that are not isolated, from
/sys/devices/system/cpu/online and /sys/devices/system/cpu/isolated. The
three cases will then run with isolcpus=domain,6,7 too.
> could these helpers be shared (or these three cases folded into
> deadline_bw_test.c) so online and isolated CPUs are handled consistently?
This test is a small reproducer of the first fix, and it runs on its
own. I would rather share the helpers of this directory in a separate
cleanup.
Thanks,
Mathieu
--
Mathieu Desnoyers
EfficiOS Inc.
https://www.efficios.com