[LTP] [PATCH v1] memcontrol03: Using clean page cache to avoid dependency on IO rate
Cyril Hrubis
chrubis@suse.cz
Thu Mar 14 12:24:32 CET 2024
Hi!
> Bad IO situation(storage bandwidth ~10MB/sec) will lead background
> writeback has uncertain progress for dirty page. So system can not
> reclaim enough memory for new process and finally lead a unexpected
> OOM.
>
> memcontrol03.c:218: TPASS: Expect: (A/B/E memory.current=0) ~= 0
> memcontrol03.c:116: TPASS: Child 1918 killed by OOM
> memcontrol03.c:224: TPASS: Expect: (A/B memory.current=52588544) ~= 52428800
> memcontrol03.c:129: TFAIL: Expected child 1944 to exit(0), but instead killed by SIGKILL
This is strange the order of messages here does not make any sense. the
last line in the log shouldn't be there at all, the test should have
ended with the "Expect: (A/B memory.current=52588544) ~= 52428800"
Can you please send the whole log?
> Signed-off-by: Wei Gao <wegao@suse.com>
> ---
> testcases/kernel/controllers/memcg/memcontrol03.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/testcases/kernel/controllers/memcg/memcontrol03.c b/testcases/kernel/controllers/memcg/memcontrol03.c
> index 9c6c808e0..9903ba82b 100644
> --- a/testcases/kernel/controllers/memcg/memcontrol03.c
> +++ b/testcases/kernel/controllers/memcg/memcontrol03.c
> @@ -201,6 +201,7 @@ static void test_memcg_min(void)
> sleep(1);
> }
>
> + sync();
> alloc_anon_in_child(trunk_cg[G], MB(148), 0);
>
> SAFE_CG_SCANF(trunk_cg[B], "memory.current", "%ld", c);
> @@ -217,6 +218,7 @@ static void test_memcg_min(void)
> TST_EXP_EXPR(values_close(c[2], 0, 1),
> "(A/B/E memory.current=%ld) ~= 0", c[2]);
>
> + sync();
> alloc_anon_in_child(trunk_cg[G], MB(170), 1);
>
> SAFE_CG_SCANF(trunk_cg[B], "memory.current", "%ld", c);
--
Cyril Hrubis
chrubis@suse.cz
More information about the ltp
mailing list