From: Sarthak Sharma <sarthak.sharma@arm.com>
To: "Gregory Price (Meta)" <gourry@gourry.net>,
linux-kselftest@vger.kernel.org, linux-mm@kvack.org
Cc: linux-kernel@vger.kernel.org, kernel-team@meta.com,
akpm@linux-foundation.org, david@kernel.org, ljs@kernel.org,
liam@infradead.org, vbabka@kernel.org, rppt@kernel.org,
surenb@google.com, mhocko@suse.com, shuah@kernel.org
Subject: Re: [PATCH 1/8] selftests/mm: add MADV_COLD and MADV_PAGEOUT contract tests
Date: Mon, 19 Oct 2026 10:29:18 +0530 [thread overview]
Message-ID: <ad987ce7-1aa1-405e-a647-456c0c2283f6@arm.com> (raw)
In-Reply-To: <20261014175756.2035176-2-gourry@gourry.net>
On 10/14/26 11:27 PM, Gregory Price (Meta) wrote:
> MADV_COLD and MADV_PAGEOUT share a page-table walker covering ordinary
> PTEs, PTE-mapped large folios and huge PMDs. Existing selftests provide
> little coverage of its range, folio-state and permission decisions.
>
> Add a kselftest harness test for both hints, starting with the most basic
> behavior userspace relies on: MADV_COLD neither populates a PTE hole nor
> faults a swapped page back in, and neither hint may be applied to a locked
> VMA.
>
> The swapped-page test skips when swap is unavailable.
>
> Signed-off-by: Gregory Price (Meta) <gourry@gourry.net>
> ---
> tools/testing/selftests/mm/Makefile | 2 +
> tools/testing/selftests/mm/ksft_madvise.sh | 4 +
> tools/testing/selftests/mm/madvise.c | 134 +++++++++++++++++++++
> tools/testing/selftests/mm/run_vmtests.sh | 5 +
> 4 files changed, 145 insertions(+)
> create mode 100755 tools/testing/selftests/mm/ksft_madvise.sh
> create mode 100644 tools/testing/selftests/mm/madvise.c
I am not sure if this test needs to be called madvise. I think this
might be a too broad name for a test for MADV_COLD and MADV_PAGEOUT. Can
we maybe call it something like madv_cold_pageout (similar to
madv_populate already present)?
Apart from that, it LGTM.
Reviewed-by: Sarthak Sharma <sarthak.sharma@arm.com>
next prev parent reply other threads:[~2026-10-19 4:59 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-14 17:57 [PATCH 0/8] " Gregory Price (Meta)
2026-10-14 17:57 ` [PATCH 1/8] " Gregory Price (Meta)
2026-10-19 4:59 ` Sarthak Sharma [this message]
2026-10-14 17:57 ` [PATCH 2/8] selftests/mm: check that MADV_PAGEOUT skips holes and swapped pages Gregory Price (Meta)
2026-10-19 5:00 ` Sarthak Sharma
2026-10-14 17:57 ` [PATCH 3/8] selftests/mm: check MADV_COLD and MADV_PAGEOUT range handling Gregory Price (Meta)
2026-10-14 21:31 ` [PATCH] fixup! " Gregory Price (Meta)
2026-10-16 12:17 ` [PATCH 3/8] " Sarthak Sharma
2026-10-16 13:22 ` Gregory Price
2026-10-16 14:07 ` Gregory Price
2026-10-19 4:48 ` Sarthak Sharma
2026-10-14 17:57 ` [PATCH 4/8] selftests/mm: check that MADV_COLD and MADV_PAGEOUT reject hugetlb Gregory Price (Meta)
2026-10-19 5:02 ` Sarthak Sharma
2026-10-14 17:57 ` [PATCH 5/8] selftests/mm: check that MADV_COLD and MADV_PAGEOUT preserve shared memory Gregory Price (Meta)
2026-10-19 5:13 ` Sarthak Sharma
2026-10-14 17:57 ` [PATCH 6/8] selftests/mm: check MADV_COLD and MADV_PAGEOUT on partly advised THPs Gregory Price (Meta)
2026-10-19 5:16 ` Sarthak Sharma
2026-10-14 17:57 ` [PATCH 7/8] selftests/mm: check MADV_PAGEOUT file permissions Gregory Price (Meta)
2026-10-16 12:18 ` Sarthak Sharma
2026-10-16 13:48 ` Gregory Price
2026-10-19 4:51 ` Sarthak Sharma
2026-10-14 17:57 ` [PATCH 8/8] selftests/mm: check that unauthorized MADV_PAGEOUT skips large file folios Gregory Price (Meta)
2026-10-14 21:26 ` Gregory Price
2026-10-19 5:19 ` Sarthak Sharma
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=ad987ce7-1aa1-405e-a647-456c0c2283f6@arm.com \
--to=sarthak.sharma@arm.com \
--cc=akpm@linux-foundation.org \
--cc=david@kernel.org \
--cc=gourry@gourry.net \
--cc=kernel-team@meta.com \
--cc=liam@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ljs@kernel.org \
--cc=mhocko@suse.com \
--cc=rppt@kernel.org \
--cc=shuah@kernel.org \
--cc=surenb@google.com \
--cc=vbabka@kernel.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
all inboxes | Powered by JetHome®