mirror of
https://github.com/torvalds/linux.git
synced 2024-12-12 14:12:51 +00:00
b93c28ff72
Add a selftest to cover the zswapin code path, allocating more memory than the cgroup limit to trigger swapout/zswapout, then reading the pages back in memory several times. This is inspired by a recently encountered kernel crash on the zswapin path in our internal kernel, which went undetected because of a lack of test coverage for this path. Add a selftest to verify that when memory.zswap.max = 0, no pages can go to the zswap pool for the cgroup. [nphamcs@gmail.com: remove redundant comment, add success checks] Link: https://lkml.kernel.org/r/20240222043132.616320-1-nphamcs@gmail.com Link: https://lkml.kernel.org/r/20240205225608.3083251-4-nphamcs@gmail.com Signed-off-by: Nhat Pham <nphamcs@gmail.com> Suggested-by: Rik van Riel <riel@surriel.com> Suggested-by: Yosry Ahmed <yosryahmed@google.com> Acked-by: Yosry Ahmed <yosryahmed@google.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Roman Gushchin <roman.gushchin@linux.dev> 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> |
||
---|---|---|
.. | ||
.gitignore | ||
cgroup_util.c | ||
cgroup_util.h | ||
config | ||
Makefile | ||
memcg_protection.m | ||
test_core.c | ||
test_cpu.c | ||
test_cpuset_prs.sh | ||
test_cpuset.c | ||
test_freezer.c | ||
test_hugetlb_memcg.c | ||
test_kill.c | ||
test_kmem.c | ||
test_memcontrol.c | ||
test_stress.sh | ||
test_zswap.c | ||
wait_inotify.c | ||
with_stress.sh |