From: Ryan Roberts <ryan.roberts@arm.com>
To: Chris Li <chrisl@kernel.org>, Barry Song <21cnbao@gmail.com>
Cc: akpm@linux-foundation.org, shuah@kernel.org, linux-mm@kvack.org,
david@redhat.com, hughd@google.com, kaleshsingh@google.com,
kasong@tencent.com, linux-kernel@vger.kernel.org,
ying.huang@intel.com, linux-kselftest@vger.kernel.org,
Barry Song <v-songbaohua@oppo.com>
Subject: Re: [PATCH] selftests/mm: Introduce a test program to assess swap entry allocation for thp_swapout
Date: Fri, 21 Jun 2024 08:34:13 +0100 [thread overview]
Message-ID: <4bf2aecc-1c7b-420c-aa82-8613e2422407@arm.com> (raw)
In-Reply-To: <CAF8kJuOserGkULxghiMFP=UhC_DdVaYVXZhqu6RY=SHT3mszpQ@mail.gmail.com>
On 21/06/2024 00:34, Chris Li wrote:
>> + * thp_swap_allocator_test
>> + *
>> + * The purpose of this test program is helping check if THP swpout
>> + * can correctly get swap slots to swap out as a whole instead of
>> + * being split. It randomly releases swap entries through madvise
>> + * DONTNEED and do swapout on two memory areas: a memory area for
>> + * 64KB THP and the other area for small folios. The second memory
>> + * can be enabled by "-s".
>> + * Before running the program, we need to setup a zRAM or similar
>> + * swap device by:
>> + * echo lzo > /sys/block/zram0/comp_algorithm
>> + * echo 64M > /sys/block/zram0/disksize
>> + * echo never > /sys/kernel/mm/transparent_hugepage/hugepages-2048kB/enabled
>> + * echo always > /sys/kernel/mm/transparent_hugepage/hugepages-64kB/enabled
>> + * mkswap /dev/zram0
>> + * swapon /dev/zram0
>
> This setup needs to go into run_vmtest.sh as well.
>
> Also tear it down after the test.
Additionally, if keeping this as a selftest, you'll want to add
CONFIG_ZRAM=y
to tools/testing/selftests/mm/config so that automated systems ensure zram is
available in the kernel under test.
And you will need to ensure that the zram device has a higher priority than any
other already configured swap devices. Otherwise there will not even be an
attempt to use it for mTHP. The easy way is to do "swapoff -a" as the first step
but that makes cleanup tricky.
prev parent reply other threads:[~2024-06-21 7:34 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-20 0:26 Barry Song
2024-06-20 1:53 ` Huang, Ying
2024-06-20 2:04 ` Barry Song
2024-06-20 5:20 ` Huang, Ying
2024-06-20 6:09 ` Barry Song
2024-06-20 6:34 ` Huang, Ying
2024-06-20 7:25 ` Barry Song
2024-06-20 7:59 ` Huang, Ying
2024-06-20 8:11 ` Barry Song
2024-06-20 8:26 ` Huang, Ying
2024-06-20 9:07 ` Barry Song
[not found] ` <3e185f8d-da63-4a61-9cd1-9804bd972515@redhat.com>
2024-06-20 7:24 ` Huang, Ying
2024-06-20 9:04 ` Ryan Roberts
2024-06-20 11:34 ` David Hildenbrand
2024-06-21 2:33 ` Huang, Ying
2024-06-21 7:25 ` Ryan Roberts
2024-06-21 7:47 ` Barry Song
2024-06-21 7:58 ` Ryan Roberts
2024-06-21 8:50 ` Chris Li
2024-06-21 11:20 ` Barry Song
2024-06-21 9:22 ` Huang, Ying
2024-06-21 9:43 ` Barry Song
2024-06-24 3:42 ` Huang, Ying
2024-06-24 4:05 ` Barry Song
2024-06-24 6:59 ` Huang, Ying
2024-06-24 7:55 ` Barry Song
2024-06-21 8:52 ` David Hildenbrand
2024-06-20 23:34 ` Chris Li
2024-06-21 7:34 ` Ryan Roberts [this message]
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=4bf2aecc-1c7b-420c-aa82-8613e2422407@arm.com \
--to=ryan.roberts@arm.com \
--cc=21cnbao@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=chrisl@kernel.org \
--cc=david@redhat.com \
--cc=hughd@google.com \
--cc=kaleshsingh@google.com \
--cc=kasong@tencent.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=shuah@kernel.org \
--cc=v-songbaohua@oppo.com \
--cc=ying.huang@intel.com \
/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