Re: [PATCH v8 1/2] selftests: memcg: Allow low event with no memory.low and memory_recursiveprot on

From: Michal Koutný
Date: Fri May 02 2025 - 05:43:14 EST


On Thu, May 01, 2025 at 09:04:42PM -0400, Waiman Long <longman@xxxxxxxxxx> wrote:
> Modify the test_memcontrol.c to ignore low event in the 3rd child cgroup
> with memory_recursiveprot on.
>
> The 4th child cgroup has no memory usage and so has an effective
> low of 0. It has no low event count because the mem_cgroup_below_low()
> check in shrink_node_memcgs() is skipped as mem_cgroup_below_min()
> returns true. If we ever change mem_cgroup_below_min() in such a way
> that it no longer skips the no usage case, we will have to add code to
> explicitly skip it.
>
> With this patch applied, the test_memcg_low sub-test finishes
> successfully without failure in most cases. Though both test_memcg_low
> and test_memcg_min sub-tests may still fail occasionally if the
> memory.current values fall outside of the expected ranges.
>
> Suggested-by: Michal Koutný <mkoutny@xxxxxxxx>
> Signed-off-by: Waiman Long <longman@xxxxxxxxxx>

Acked-by: Michal Koutný <mkoutny@xxxxxxxx>

(Thank you. Not sure if this can be both with Suggested-by, so either of
them alone is fine by me.)

Attachment: signature.asc
Description: PGP signature