From b801016e17b099f9d8343ed6f21a38eeaea78762 Mon Sep 17 00:00:00 2001 From: Pavithra Date: Mon, 16 Mar 2026 17:39:29 +0530 Subject: [PATCH] Fix memcontrol03 testcase failure on powerpc. On ppc64le with 64KB page size, the 148MB allocation triggers OOM due to memory accounting overhead and slower pagecache eviction. Use 140MB to provide safety margin while creating sufficient pressure to test memory.min protection effectively. Signed-off-by: Pavithra --- testcases/kernel/controllers/memcg/memcontrol03.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/testcases/kernel/controllers/memcg/memcontrol03.c b/testcases/kernel/controllers/memcg/memcontrol03.c index 493e970ab5f..3623797f312 100644 --- a/testcases/kernel/controllers/memcg/memcontrol03.c +++ b/testcases/kernel/controllers/memcg/memcontrol03.c @@ -212,7 +212,17 @@ static void test_memcg_min(void) sleep(1); } + /* + * On ppc64le with 64KB page size, the 148MB allocation triggers OOM + * due to memory accounting overhead and slower pagecache eviction. + * Use 140MB to provide safety margin while creating sufficient pressure + * to test memory.min protection effectively. + */ +#ifdef __powerpc64__ + alloc_anon_in_child(trunk_cg[G], MB(140), 0); +#else alloc_anon_in_child(trunk_cg[G], MB(148), 0); +#endif SAFE_CG_SCANF(trunk_cg[B], "memory.current", "%ld", c); TST_EXP_EXPR(values_close(c[0], MB(50), 5),