diff options
| author | Sasha Levin <sashal@kernel.org> | 2026-10-24 10:09:33 -0400 |
|---|---|---|
| committer | Tejun Heo <tj@kernel.org> | 2026-10-27 07:46:49 -1000 |
| commit | 7f64fdeaf3b738f4c75a6d820032270c6732962e (patch) | |
| tree | 25a899d3536d12989672d625fc70ee02c43ee0db /scripts/Makefile.thinlto | |
| parent | 518cec2def9992192291f5028edc077fb2e475e9 (diff) | |
| download | linux-next-7f64fdeaf3b738f4c75a6d820032270c6732962e.tar.gz linux-next-7f64fdeaf3b738f4c75a6d820032270c6732962e.zip | |
selftests/cgroup: Don't count cgroup.threads in test_cgcore_proc_migration
test_cgcore_proc_migration() moves a process with 13 extra threads to
cg_dst and checks that they all moved by counting the lines of
cg_dst/cgroup.threads.
test_stress.sh runs test_core while enabling and disabling cpuset in the
root cgroup.subtree_control in a loop. Each change moves every task in
the hierarchy to a new css_set. Reading cgroup.threads walks the
cgroup's css_sets without holding cgroup_mutex, so when such a change
lands in the middle of the read, threads that were already listed from
the old css_set are listed again from the new one. The test then fails
with "not ok 8 test_cgcore_proc_migration" although the migration
worked.
Running the test's steps 40000 times in a 2 CPU KVM guest with the
cpuset changes going on, 5 reads listed the 14 threads two or three
times over (up to 36 lines), and a second read right after gave 14.
Without the cpuset changes it did not happen in 40000 runs. With
test_stress.sh, the test failed in 2 of 150 runs.
Check the cgroup of each thread of the process in /proc instead, which
other migrations can't affect.
Signed-off-by: Sasha Levin <sashal@kernel.org>
Reviewed-by: Tao Cui <cuitao@kylinos.cn>
Tested-by: Tao Cui <cuitao@kylinos.cn>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
