Patch "selftests: cgroup: fix unexpected failure on test_memcg_low" has been added to the 6.3-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    selftests: cgroup: fix unexpected failure on test_memcg_low

to the 6.3-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     selftests-cgroup-fix-unexpected-failure-on-test_memc.patch
and it can be found in the queue-6.3 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit f5e82b092c8b5c2eacc4543300e613eaa71cfce2
Author: Haifeng Xu <haifeng.xu@xxxxxxxxxx>
Date:   Mon May 22 09:52:33 2023 +0000

    selftests: cgroup: fix unexpected failure on test_memcg_low
    
    [ Upstream commit 19ab365762c6cc39dfdee9e13ab0d12fe4b5540d ]
    
    Since commit f079a020ba95 ("selftests: memcg: factor out common parts of
    memory.{low,min} tests"), the value used in second alloc_anon has changed
    from 148M to 170M.  Because memory.low allows reclaiming page cache in
    child cgroups, so the memory.current is close to 30M instead of 50M.
    Therefore, adjust the expected value of parent cgroup.
    
    Link: https://lkml.kernel.org/r/20230522095233.4246-2-haifeng.xu@xxxxxxxxxx
    Fixes: f079a020ba95 ("selftests: memcg: factor out common parts of memory.{low,min} tests")
    Signed-off-by: Haifeng Xu <haifeng.xu@xxxxxxxxxx>
    Cc: Johannes Weiner <hannes@xxxxxxxxxxx>
    Cc: Michal Hocko <mhocko@xxxxxxxxxx>
    Cc: Roman Gushchin <roman.gushchin@xxxxxxxxx>
    Cc: Shakeel Butt <shakeelb@xxxxxxxxxx>
    Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/tools/testing/selftests/cgroup/test_memcontrol.c b/tools/testing/selftests/cgroup/test_memcontrol.c
index f4f7c0aef702b..a2a90f4bfe9fe 100644
--- a/tools/testing/selftests/cgroup/test_memcontrol.c
+++ b/tools/testing/selftests/cgroup/test_memcontrol.c
@@ -292,6 +292,7 @@ static int test_memcg_protection(const char *root, bool min)
 	char *children[4] = {NULL};
 	const char *attribute = min ? "memory.min" : "memory.low";
 	long c[4];
+	long current;
 	int i, attempts;
 	int fd;
 
@@ -400,7 +401,8 @@ static int test_memcg_protection(const char *root, bool min)
 		goto cleanup;
 	}
 
-	if (!values_close(cg_read_long(parent[1], "memory.current"), MB(50), 3))
+	current = min ? MB(50) : MB(30);
+	if (!values_close(cg_read_long(parent[1], "memory.current"), current, 3))
 		goto cleanup;
 
 	if (!reclaim_until(children[0], MB(10)))



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux