]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
selftests: cgroup: fix test_kmem_basic less than error
authorLucas Karpinski <lkarpins@redhat.com>
Fri, 4 Aug 2023 19:35:29 +0000 (15:35 -0400)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 21 Aug 2023 20:07:21 +0000 (13:07 -0700)
commit60439471f30be00dc4f6648322ab1a3a3f89777f
treedb1a44ba22fcc76d0fe545e23203fe626f0d4a5e
parent49b0638502da097c15d46cd4e871dbaa022caf7c
selftests: cgroup: fix test_kmem_basic less than error

test_kmem_basic creates 100,000 negative dentries, with each one mapping
to a slab object.  After memory.high is set, these are reclaimed through
the shrink_slab function call which reclaims all 100,000 entries.  The
test passes the majority of the time because when slab1 or current is
calculated, it is often above 0, however, 0 is also an acceptable value.

Link: https://lkml.kernel.org/r/7d6gcuyzdjcice6qbphrmpmv5skr5jtglg375unnjxqhstvhxc@qkn6dw6bao6v
Signed-off-by: Lucas Karpinski <lkarpins@redhat.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Muchun Song <muchun.song@linux.dev>
Cc: Roman Gushchin <roman.gushchin@linux.dev>
Cc: Shakeel Butt <shakeelb@google.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Tejun Heo <tj@kernel.org>
Cc: Zefan Li <lizefan.x@bytedance.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
tools/testing/selftests/cgroup/test_kmem.c