* + selftests-mm-add-separate-uffdio_move-test-for-pmd-splitting.patch added to mm-unstable branch
@ 2024-01-02 19:34 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2024-01-02 19:34 UTC (permalink / raw)
To: mm-commits, zhangpeng362, willy, viro, shuah, ryan.roberts, rppt,
peterx, ngeoffray, mhocko, lokeshgidra, Liam.Howlett, kaleshsingh,
jannh, hughd, david, brauner, bgeffon, axelrasmussen, aarcange,
surenb, akpm
The patch titled
Subject: selftests/mm: add separate UFFDIO_MOVE test for PMD splitting
has been added to the -mm mm-unstable branch. Its filename is
selftests-mm-add-separate-uffdio_move-test-for-pmd-splitting.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/selftests-mm-add-separate-uffdio_move-test-for-pmd-splitting.patch
This patch will later appear in the mm-unstable branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next via the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days
------------------------------------------------------
From: Suren Baghdasaryan <surenb@google.com>
Subject: selftests/mm: add separate UFFDIO_MOVE test for PMD splitting
Date: Fri, 29 Dec 2023 18:56:36 -0800
Add a test for UFFDIO_MOVE ioctl operating on a hugepage which has to be
split because destination is marked with MADV_NOHUGEPAGE. With this we
cover all 3 cases: normal page move, hugepage move, hugepage splitting
before move.
Link: https://lkml.kernel.org/r/20231230025636.2477429-1-surenb@google.com
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Axel Rasmussen <axelrasmussen@google.com>
Cc: Brian Geffon <bgeffon@google.com>
Cc: Christian Brauner <brauner@kernel.org>
Cc: David Hildenbrand <david@redhat.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Jann Horn <jannh@google.com>
Cc: Kalesh Singh <kaleshsingh@google.com>
Cc: Liam R. Howlett <Liam.Howlett@oracle.com>
Cc: Lokesh Gidra <lokeshgidra@google.com>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Mike Rapoport (IBM) <rppt@kernel.org>
Cc: Nicolas Geoffray <ngeoffray@google.com>
Cc: Peter Xu <peterx@redhat.com>
Cc: Ryan Roberts <ryan.roberts@arm.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: ZhangPeng <zhangpeng362@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
tools/testing/selftests/mm/uffd-unit-tests.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
--- a/tools/testing/selftests/mm/uffd-unit-tests.c~selftests-mm-add-separate-uffdio_move-test-for-pmd-splitting
+++ a/tools/testing/selftests/mm/uffd-unit-tests.c
@@ -1199,6 +1199,16 @@ static void uffd_move_test(uffd_test_arg
static void uffd_move_pmd_test(uffd_test_args_t *targs)
{
+ if (madvise(area_dst, nr_pages * page_size, MADV_HUGEPAGE))
+ err("madvise(MADV_HUGEPAGE) failure");
+ uffd_move_test_common(targs, read_pmd_pagesize(),
+ uffd_move_pmd_handle_fault);
+}
+
+static void uffd_move_pmd_split_test(uffd_test_args_t *targs)
+{
+ if (madvise(area_dst, nr_pages * page_size, MADV_NOHUGEPAGE))
+ err("madvise(MADV_NOHUGEPAGE) failure");
uffd_move_test_common(targs, read_pmd_pagesize(),
uffd_move_pmd_handle_fault);
}
@@ -1329,6 +1339,13 @@ uffd_test_case_t uffd_tests[] = {
.mem_targets = MEM_ANON,
.uffd_feature_required = UFFD_FEATURE_MOVE,
.test_case_ops = &uffd_move_test_pmd_case_ops,
+ },
+ {
+ .name = "move-pmd-split",
+ .uffd_fn = uffd_move_pmd_split_test,
+ .mem_targets = MEM_ANON,
+ .uffd_feature_required = UFFD_FEATURE_MOVE,
+ .test_case_ops = &uffd_move_test_pmd_case_ops,
},
{
.name = "wp-fork",
_
Patches currently in -mm which might be from surenb@google.com are
selftests-mm-add-separate-uffdio_move-test-for-pmd-splitting.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-01-02 19:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-02 19:34 + selftests-mm-add-separate-uffdio_move-test-for-pmd-splitting.patch added to mm-unstable branch Andrew Morton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.