lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ud6wzhszf5jwg23c7wtq2wfhwann2c3uuib2bsx2ty7sd6x6ym@3admzvaukqq4>
Date: Thu, 4 Dec 2025 16:04:41 +0100
From: Michal Koutný <mkoutny@...e.com>
To: Guopeng Zhang <zhangguopeng@...inos.cn>
Cc: tj@...nel.org, hannes@...xchg.org, shuah@...nel.org, 
	roman.gushchin@...ux.dev, lance.yang@...ux.dev, shakeel.butt@...ux.dev, 
	muchun.song@...ux.dev, linux-kselftest@...r.kernel.org, linux-mm@...ck.org, 
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v5 3/3] selftests: cgroup: Replace sleep with
 cg_read_key_long_poll() for waiting on nr_dying_descendants

On Wed, Dec 03, 2025 at 07:56:31PM +0800, Guopeng Zhang <zhangguopeng@...inos.cn> wrote:
> 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.

Great!

> 
> Signed-off-by: Guopeng Zhang <zhangguopeng@...inos.cn>
> Reviewed-by: Shakeel Butt <shakeel.butt@...ux.dev>
> ---
>  tools/testing/selftests/cgroup/test_kmem.c | 33 ++++++++++------------
>  1 file changed, 15 insertions(+), 18 deletions(-)

Acked-by: Michal Koutný <mkoutny@...e.com>

Download attachment "signature.asc" of type "application/pgp-signature" (266 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ