mirror-linux/tools
Guopeng Zhang 50133c09d1 selftests: cgroup: Replace sleep with cg_read_key_long_poll() for waiting on nr_dying_descendants
Replace the manual sleep-and-retry logic in test_kmem_dead_cgroups()
with the new helper `cg_read_key_long_poll()`. This change improves
the robustness of the test by polling the "nr_dying_descendants"
counter in `cgroup.stat` until it reaches 0 or the timeout is exceeded.

Additionally, increase the retry timeout to 8 seconds (from 5 seconds)
based on testing results:
  - With 5-second timeout: 4/20 runs passed.
  - With 8-second timeout: 20/20 runs passed.

The 8 second timeout is based on stress testing of test_kmem_dead_cgroups()
under load: 5 seconds was occasionally not enough for reclaim of dying
descendants to complete, whereas 8 seconds consistently covered the observed
latencies. This value is intended as a generous upper bound for the
asynchronous reclaim and is not tied to any specific kernel constant, so it
can be adjusted in the future if reclaim behavior changes.

Signed-off-by: Guopeng Zhang <zhangguopeng@kylinos.cn>
Reviewed-by: Shakeel Butt <shakeel.butt@linux.dev>
Acked-by: Michal Koutný <mkoutny@suse.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
2025-12-08 08:44:54 -10:00
..
accounting
arch [GIT PULL] perf tools changes for v6.19 2025-12-07 07:07:02 -08:00
bootconfig
bpf bpf: Remove runqslower tool 2025-11-28 15:20:16 -08:00
build [GIT PULL] perf tools changes for v6.19 2025-12-07 07:07:02 -08:00
certs
cgroup
counter
crypto
debugging
dma dma-mapping updates for Linux 6.19: 2025-12-06 09:25:05 -08:00
docs docs: makefile: move rustdoc check to the build wrapper 2025-11-29 08:42:53 -07:00
firewire
firmware
gpio
hv
iio
include [GIT PULL] perf tools changes for v6.19 2025-12-07 07:07:02 -08:00
kvm/kvm_stat
laptop
leds
lib [GIT PULL] perf tools changes for v6.19 2025-12-07 07:07:02 -08:00
memory-model
mm tools/mm/page_owner_sort: add help option support 2025-11-16 17:28:06 -08:00
net NFSD 6.19 Release Notes 2025-12-06 10:57:02 -08:00
objtool objtool: Add more robust signal error handling, detect and warn about stack overflows 2025-12-03 19:42:37 +01:00
pcmcia
perf [GIT PULL] perf tools changes for v6.19 2025-12-07 07:07:02 -08:00
power turbostat-v2025.12.02 2025-12-06 09:35:00 -08:00
rcu
sched
sched_ext sched_ext: tools: Removing duplicate targets during non-cross compilation 2025-11-20 07:00:27 -10:00
scripts
sound
spi
testing selftests: cgroup: Replace sleep with cg_read_key_long_poll() for waiting on nr_dying_descendants 2025-12-08 08:44:54 -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
wmi
workqueue
writeback
Makefile