Skip to contentSkip to conversation

kselftests-cgroup-add-kernel-memory-accounting-tests.patch removed from -mm tree

merged [email protected] 1 participant 1 message Aug 10, 2020

lore
Share & tools
lore

[email protected]

author tree notice Applied
#0 lore raw

The patch titled
Subject: kselftests: cgroup: add kernel memory accounting tests
has been removed from the -mm tree. Its filename was
kselftests-cgroup-add-kernel-memory-accounting-tests.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Roman Gushchin <[email protected]>
Subject: kselftests: cgroup: add kernel memory accounting tests

Add some tests to cover the kernel memory accounting functionality. These are covering some issues (and changes) we had recently.

1) A test which allocates a lot of negative dentries, checks memcg slab statistics, creates memory pressure by setting memory.max to some low value and checks that some number of slabs was reclaimed.

2) A test which covers side effects of memcg destruction: it creates and destroys a large number of sub-cgroups, each containing a multi-threaded workload which allocates and releases some kernel memory. Then it checks that the charge ans memory.stats do add up on the parent level.

3) A test which reads /proc/kpagecgroup and implicitly checks that it doesn't crash the system.

4) A test which spawns a large number of threads and checks that the kernel stacks accounting works as expected.

5) A test which checks that living charged slab objects are not preventing the memory cgroup from being released after being deleted by a user.

---

 tools/testing/selftests/cgroup/.gitignore  |    1 
 tools/testing/selftests/cgroup/Makefile    |    2 
 tools/testing/selftests/cgroup/test_kmem.c |  382 +++++++++++++++++++
 3 files changed, 385 insertions(+)
tools/testing/selftests/cgroup/.gitignore renamed from tools/testing/selftests/cgroup/.gitignore~kselftests-cgroup-add-kernel-memory-accounting-tests +1 -0
@@ -2,3 +2,4 @@
 test_memcontrol
 test_core
 test_freezer
+test_kmem
\ No newline at end of file
tools/testing/selftests/cgroup/Makefile renamed from tools/testing/selftests/cgroup/Makefile~kselftests-cgroup-add-kernel-memory-accounting-tests +2 -0
@@ -6,11 +6,13 @@ all:
 TEST_FILES     := with_stress.sh
 TEST_PROGS     := test_stress.sh
 TEST_GEN_PROGS = test_memcontrol
+TEST_GEN_PROGS += test_kmem
 TEST_GEN_PROGS += test_core
 TEST_GEN_PROGS += test_freezer
 
 include ../lib.mk
 
 $(OUTPUT)/test_memcontrol: cgroup_util.c ../clone3/clone3_selftests.h
+$(OUTPUT)/test_kmem: cgroup_util.c ../clone3/clone3_selftests.h
 $(OUTPUT)/test_core: cgroup_util.c ../clone3/clone3_selftests.h
 $(OUTPUT)/test_freezer: cgroup_util.c ../clone3/clone3_selftests.h
tools/testing/selftests/cgroup/test_kmem.c new file +382 -0

382 lines not on this page · raw message

_

Patches currently in -mm which might be from [email protected] are

percpu-return-number-of-released-bytes-from-pcpu_free_area.patch mm-memcg-percpu-account-percpu-memory-to-memory-cgroups.patch mm-memcg-percpu-per-memcg-percpu-memory-statistics.patch mm-memcg-percpu-per-memcg-percpu-memory-statistics-v3.patch mm-memcg-charge-memcg-percpu-memory-to-the-parent-cgroup.patch kselftests-cgroup-add-perpcu-memory-accounting-test.patch mm-vmstat-fix-proc-sys-vm-stat_refresh-generating-false-warnings.patch mm-vmstat-fix-proc-sys-vm-stat_refresh-generating-false-warnings-fix.patch