[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3p7o2cxir6yz4baonmkrzumklg5zx3oddhi7mqlmxu26j7ze33@u2mrvj6pqad4>
Date: Tue, 2 Dec 2025 15:18:42 -0800
From: Shakeel Butt <shakeel.butt@...ux.dev>
To: Guopeng Zhang <zhangguopeng@...inos.cn>
Cc: tj@...nel.org, hannes@...xchg.org, mhocko@...nel.org,
roman.gushchin@...ux.dev, mkoutny@...e.com, muchun.song@...ux.dev, lance.yang@...ux.dev,
shuah@...nel.org, linux-mm@...ck.org, linux-kselftest@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 3/3] selftests: cgroup: Replace sleep with
cg_read_key_long_poll() for waiting on nr_dying_descendants
On Mon, Nov 24, 2025 at 08:38:16PM +0800, Guopeng Zhang wrote:
> Replaced 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, increased the retry timeout to 8 seconds (from 5 seconds) based on testing results:
Why 8 seconds? What does it depend on? For memcg stats I see the 3
seconds driven from the 2 sec periodic rstat flush. Mainly how can we
make this more future proof?
> - With 5-second timeout: 4/20 runs passed.
> - With 8-second timeout: 20/20 runs passed.
>
> Signed-off-by: Guopeng Zhang <zhangguopeng@...inos.cn>
Anyways, just add a sentence in the commit message on the reasoning
behind 8 seconds and a comment in code as well. With that, you can add:
Reviewed-by: Shakeel Butt <shakeel.butt@...ux.dev>
Powered by blists - more mailing lists