LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Zhansaya Bagdauletkyzy <zhansayabagdaulet@gmail.com>
To: shuah@kernel.org, akpm@linux-foundation.org
Cc: linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
	linux-mm@kvack.org, tyhicks@linux.microsoft.com,
	pasha.tatashin@soleen.com
Subject: [PATCH v2 0/4] add KSM selftests
Date: Wed, 14 Jul 2021 14:56:01 +0600	[thread overview]
Message-ID: <cover.1626252248.git.zhansayabagdaulet@gmail.com> (raw)

Introduce selftests to validate the functionality of KSM. The tests are
run on private anonymous pages. Since some KSM tunables are modified,
their starting values are saved and restored after testing. At the
start, run is set to 2 to ensure that only test pages will be merged (we
assume that no applications make madvise syscalls in the background). If
KSM config not enabled, all tests will be skipped.

Zhansaya Bagdauletkyzy (4):
  selftests: vm: add KSM merge test
  selftests: vm: add KSM unmerge test
  selftests: vm: add KSM zero page merging test
  selftests: vm: add KSM merging across nodes test

v1 -> v2:
- add a test to check KSM unmerging
- add a test to check merging of zero pages
- add a test to check merging in different NUMA nodes
- include command line options for each test
- new options to specify use_zero_pages and merge_across_nodes
- run each test case in run_vmtests.sh
- add some helper functions to make the code more compact:
  allocate_memory(), ksm_do_scan(), ksm_merge_pages()

 tools/testing/selftests/vm/.gitignore     |   1 +
 tools/testing/selftests/vm/Makefile       |   3 +
 tools/testing/selftests/vm/ksm_tests.c    | 516 ++++++++++++++++++++++
 tools/testing/selftests/vm/run_vmtests.sh |  96 ++++
 4 files changed, 616 insertions(+)
 create mode 100644 tools/testing/selftests/vm/ksm_tests.c

-- 
2.25.1


             reply	other threads:[~2021-07-14  8:56 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-14  8:56 Zhansaya Bagdauletkyzy [this message]
2021-07-14  8:56 ` [PATCH v2 1/4] selftests: vm: add KSM merge test Zhansaya Bagdauletkyzy
2021-08-04  1:54   ` Pavel Tatashin
2021-08-16 13:57   ` Tyler Hicks
2021-07-14  8:56 ` [PATCH v2 2/4] selftests: vm: add KSM unmerge test Zhansaya Bagdauletkyzy
2021-08-04  1:58   ` Pavel Tatashin
2021-08-16 13:57   ` Tyler Hicks
2021-07-14  8:56 ` [PATCH v2 3/4] selftests: vm: add KSM zero page merging test Zhansaya Bagdauletkyzy
2021-08-04  1:59   ` Pavel Tatashin
2021-08-16 14:00   ` Tyler Hicks
2021-07-14  8:56 ` [PATCH v2 4/4] selftests: vm: add KSM merging across nodes test Zhansaya Bagdauletkyzy
2021-08-04  2:01   ` Pavel Tatashin
2021-08-16 14:28   ` Tyler Hicks
2021-07-14 22:51 ` [PATCH v2 0/4] add KSM selftests Andrew Morton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1626252248.git.zhansayabagdaulet@gmail.com \
    --to=zhansayabagdaulet@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=pasha.tatashin@soleen.com \
    --cc=shuah@kernel.org \
    --cc=tyhicks@linux.microsoft.com \
    --subject='Re: [PATCH v2 0/4] add KSM selftests' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).