selftests-mm-add-new-selftests-for-ksm.patch removed from -mm tree
The quilt patch titled
Subject: selftests/mm: add new selftests for KSM
has been removed from the -mm tree. Its filename was
selftests-mm-add-new-selftests-for-ksm.patch
This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Stefan Roesch <[email protected]>
Subject: selftests/mm: add new selftests for KSM
Date: Mon, 17 Apr 2023 22:13:42 -0700
This adds three new tests to the selftests for KSM. These tests use the new prctl API's to enable and disable KSM.
1) add new prctl flags to prctl header file in tools dir
This adds the new prctl flags to the include file prct.h in the tools directory. This makes sure they are available for testing.
2) add KSM prctl merge test to ksm_tests
This adds the -t option to the ksm_tests program. The -t flag allows to specify if it should use madvise or prctl ksm merging.
3) add two functions for debugging merge outcome for ksm_tests
This adds two functions to report the metrics in /proc/self/ksm_stat and /sys/kernel/debug/mm/ksm. The debug output is enabled with the -d option.
4) add KSM prctl test to ksm_functional_tests
This adds a test to the ksm_functional_test that verifies that the prctl system call to enable / disable KSM works.
5) add KSM fork test to ksm_functional_test
Add fork test to verify that the MMF_VM_MERGE_ANY flag is inherited by the child process.
---
tools/include/uapi/linux/prctl.h | 2 tools/testing/selftests/mm/Makefile | 2 tools/testing/selftests/mm/ksm_functional_tests.c | 91 ++++++ tools/testing/selftests/mm/ksm_tests.c | 172 +++++++++--- 4 files changed, 228 insertions(+), 39 deletions(-)
tools/include/uapi/linux/prctl.h renamed from tools/include/uapi/linux/prctl.h~selftests-mm-add-new-selftests-for-ksm +2 -0
@@ -290,4 +290,6 @@ struct prctl_mm_map {#define PR_SET_VMA 0x53564d41# define PR_SET_VMA_ANON_NAME 0 +#define PR_SET_MEMORY_MERGE 67 +#define PR_GET_MEMORY_MERGE 68#endif /* _LINUX_PRCTL_H */
tools/testing/selftests/mm/ksm_functional_tests.c renamed from tools/testing/selftests/mm/ksm_functional_tests.c~selftests-mm-add-new-selftests-for-ksm +90 -1
113 lines not on this page · raw message
tools/testing/selftests/mm/ksm_tests.c renamed from tools/testing/selftests/mm/ksm_tests.c~selftests-mm-add-new-selftests-for-ksm +135 -37
386 lines not on this page · raw message
tools/testing/selftests/mm/Makefile renamed from tools/testing/selftests/mm/Makefile~selftests-mm-add-new-selftests-for-ksm +1 -1
@@ -29,7 +29,7 @@ MACHINE ?= $(shell echo $(uname_M) | sed # LDLIBS. MAKEFLAGS += --no-builtin-rules -CFLAGS = -Wall -I $(top_srcdir) $(EXTRA_CFLAGS) $(KHDR_INCLUDES) +CFLAGS = -Wall -I $(top_srcdir) -I $(top_srcdir)/tools/include/uapi $(EXTRA_CFLAGS) $(KHDR_INCLUDES) LDLIBS = -lrt -lpthread TEST_GEN_PROGS = cow
_
Patches currently in -mm which might be from [email protected] are