[PATCH v8 0/2] memcg: Fix test_memcg_min/low test failures

Waiman Long posted 2 patches 7 months, 2 weeks ago
.../selftests/cgroup/test_memcontrol.c        | 22 ++++++++++++++-----
1 file changed, 16 insertions(+), 6 deletions(-)
[PATCH v8 0/2] memcg: Fix test_memcg_min/low test failures
Posted by Waiman Long 7 months, 2 weeks ago
v8:
 - Ignore the low event count of child 2 with memory_recursiveprot on
   in patch 1 as originally suggested by Michal.

v7:
 - Skip the vmscan change as the mem_cgroup_usage() check for now as
   it is currently redundant.

v6:
 - The memcg_test_low failure is indeed due to the memory_recursiveprot
   mount option which is enabled by default in systemd cgroup v2 setting.
   So adopt Michal's suggestion to adjust the low event checking
   according to whether memory_recursiveprot is enabled or not.

The test_memcontrol selftest consistently fails its test_memcg_low
sub-test (with memory_recursiveprot enabled) and sporadically fails
its test_memcg_min sub-test. This patchset fixes the test_memcg_min
and test_memcg_low failures by adjusting the test_memcontrol selftest
to fix these test failures.

Waiman Long (2):
  selftests: memcg: Allow low event with no memory.low and
    memory_recursiveprot on
  selftests: memcg: Increase error tolerance of child memory.current
    check in test_memcg_protection()

 .../selftests/cgroup/test_memcontrol.c        | 22 ++++++++++++++-----
 1 file changed, 16 insertions(+), 6 deletions(-)

-- 
2.49.0
Re: [PATCH v8 0/2] memcg: Fix test_memcg_min/low test failures
Posted by Tejun Heo 7 months, 2 weeks ago
On Thu, May 01, 2025 at 09:04:41PM -0400, Waiman Long wrote:
> v8:
>  - Ignore the low event count of child 2 with memory_recursiveprot on
>    in patch 1 as originally suggested by Michal.
> 
> v7:
>  - Skip the vmscan change as the mem_cgroup_usage() check for now as
>    it is currently redundant.
> 
> v6:
>  - The memcg_test_low failure is indeed due to the memory_recursiveprot
>    mount option which is enabled by default in systemd cgroup v2 setting.
>    So adopt Michal's suggestion to adjust the low event checking
>    according to whether memory_recursiveprot is enabled or not.
> 
> The test_memcontrol selftest consistently fails its test_memcg_low
> sub-test (with memory_recursiveprot enabled) and sporadically fails
> its test_memcg_min sub-test. This patchset fixes the test_memcg_min
> and test_memcg_low failures by adjusting the test_memcontrol selftest
> to fix these test failures.
> 
> Waiman Long (2):
>   selftests: memcg: Allow low event with no memory.low and
>     memory_recursiveprot on
>   selftests: memcg: Increase error tolerance of child memory.current
>     check in test_memcg_protection()

Acked-by: Tejun Heo <tj@kernel.org>

Probably best to go through -mm? If cgroup would be better, please let me
know.

Thanks.

-- 
tejun