From: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: "Liam R . Howlett" <Liam.Howlett@oracle.com>,
Vlastimil Babka <vbabka@suse.cz>, Jann Horn <jannh@google.com>,
Pedro Falcato <pfalcato@suse.de>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: [PATCH 0/3] tools/testing: expand mremap testing
Date: Mon, 21 Jul 2025 18:33:24 +0100 [thread overview]
Message-ID: <cover.1753119043.git.lorenzo.stoakes@oracle.com> (raw)
Expand our mremap() testing to further assert that behaviour is as
expected.
There is a poorly documented mremap() feature whereby it is possible to
mremap() multiple VMAs (even with gaps) when shrinking, as long as the
resultant shrunk range spans only a single VMA.
So we start by asserting this behaviour functions correctly both with an
in-place shrink and a shrink/move.
Next, we further test the newly introduced ability to mremap() multiple
VMAs when performing a MAP_FIXED move (that is without the size being
changed), firstly by asserting that MREMAP_DONTUNMAP has no bearing on this
behaviour.
Finally, we explicitly test that such moves, when splitting source VMAs,
function correctly.
Lorenzo Stoakes (3):
tools/testing/selftests: add mremap() shrink test for multiple VMAs
tools/testing/selftests: test MREMAP_DONTUNMAP on multiple VMA move
tools/testing/selftests: explicitly test split multi VMA mremap move
tools/testing/selftests/mm/mremap_test.c | 235 ++++++++++++++++++++++-
1 file changed, 225 insertions(+), 10 deletions(-)
--
2.50.1
next reply other threads:[~2025-07-21 17:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-21 17:33 Lorenzo Stoakes [this message]
2025-07-21 17:33 ` [PATCH 1/3] tools/testing/selftests: add mremap() shrink test for multiple VMAs Lorenzo Stoakes
2025-07-21 17:33 ` [PATCH 2/3] tools/testing/selftests: test MREMAP_DONTUNMAP on multiple VMA move Lorenzo Stoakes
2025-07-21 17:33 ` [PATCH 3/3] tools/testing/selftests: explicitly test split multi VMA mremap move Lorenzo Stoakes
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.1753119043.git.lorenzo.stoakes@oracle.com \
--to=lorenzo.stoakes@oracle.com \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=jannh@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=pfalcato@suse.de \
--cc=vbabka@suse.cz \
/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;
as well as URLs for NNTP newsgroup(s).