From: David Hildenbrand <david@redhat.com>
To: Stefan Roesch <shr@devkernel.io>, kernel-team@fb.com
Cc: linux-mm@kvack.org, riel@surriel.com, mhocko@suse.com,
linux-kselftest@vger.kernel.org, linux-doc@vger.kernel.org,
akpm@linux-foundation.org, hannes@cmpxchg.org,
willy@infradead.org, Bagas Sanjaya <bagasdotme@gmail.com>
Subject: Re: [PATCH v6 3/3] selftests/mm: add new selftests for KSM
Date: Thu, 13 Apr 2023 15:08:19 +0200 [thread overview]
Message-ID: <190bed16-7b7b-a880-9793-cdeb1baef29d@redhat.com> (raw)
In-Reply-To: <7c5606cc-ca58-c505-b0d3-2eec29fe606a@redhat.com>
On 13.04.23 15:07, David Hildenbrand wrote:
> On 12.04.23 05:16, Stefan Roesch wrote:
>> 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
>>
>> 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 KSM get merge type test
>>
>> This adds the -G flag to the ksm_tests program to query the KSM
>> status with prctl after KSM has been enabled with prctl.
>>
>> 4) add KSM fork test
>>
>> Add fork test to verify that the MMF_VM_MERGE_ANY flag is inherited
>> by the child process.
>>
>> 5) add two functions for debugging merge outcome
>>
>> This adds two functions to report the metrics in /proc/self/ksm_stat
>> and /sys/kernel/debug/mm/ksm.
>>
>> The debugging can be enabled with the following command line:
>> make -C tools/testing/selftests TARGETS="mm" --keep-going \
>> EXTRA_CFLAGS=-DDEBUG=1
>
> Would it make sense to instead have a "-D" (if still unused) runtime
> options to print this data? Dead code that's not compiled is a bit
> unfortunate as it can easily bit-rot.
>
>
>
> This patch essentially does two things
>
> 1) Add the option to run all tests/benchmarks with the PRCTL instead of
> MADVISE
>
> 2) Add some functional KSM tests for the new PRCTL (fork, enabling
> works, disabling works).
>
> The latter should rather go into ksm_functional_tests().
"tools/testing/selftests/mm/ksm_functional_tests.c" is what I wanted to say.
--
Thanks,
David / dhildenb
next prev parent reply other threads:[~2023-04-13 13:08 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-12 3:16 [PATCH v6 0/3] mm: process/cgroup ksm support Stefan Roesch
2023-04-12 3:16 ` [PATCH v6 1/3] mm: add new api to enable ksm per process Stefan Roesch
2023-04-12 13:20 ` Matthew Wilcox
2023-04-12 16:08 ` Stefan Roesch
2023-04-12 16:29 ` Matthew Wilcox
2023-04-12 15:40 ` David Hildenbrand
2023-04-12 16:44 ` Stefan Roesch
2023-04-12 18:41 ` David Hildenbrand
2023-04-12 19:08 ` David Hildenbrand
2023-04-12 19:55 ` Stefan Roesch
2023-04-13 9:46 ` David Hildenbrand
2023-04-12 3:16 ` [PATCH v6 2/3] mm: add new KSM process and sysfs knobs Stefan Roesch
2023-04-12 3:16 ` [PATCH v6 3/3] selftests/mm: add new selftests for KSM Stefan Roesch
2023-04-13 13:07 ` David Hildenbrand
2023-04-13 13:08 ` David Hildenbrand [this message]
2023-04-13 16:32 ` Stefan Roesch
2023-04-13 18:09 ` Stefan Roesch
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=190bed16-7b7b-a880-9793-cdeb1baef29d@redhat.com \
--to=david@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=bagasdotme@gmail.com \
--cc=hannes@cmpxchg.org \
--cc=kernel-team@fb.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=riel@surriel.com \
--cc=shr@devkernel.io \
--cc=willy@infradead.org \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox