All of lore.kernel.org
 help / color / mirror / Atom feed
* [merged mm-stable] selftests-mm-skip-uffd-hugetlb-tests-with-insufficient-hugepages.patch removed from -mm tree
@ 2024-03-12 20:07 Andrew Morton
  0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2024-03-12 20:07 UTC (permalink / raw)
  To: mm-commits, usama.anjum, shuah, muchun.song, ben, npache, akpm


The quilt patch titled
     Subject: selftests/mm: skip uffd hugetlb tests with insufficient hugepages
has been removed from the -mm tree.  Its filename was
     selftests-mm-skip-uffd-hugetlb-tests-with-insufficient-hugepages.patch

This patch was dropped because it was merged into the mm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Nico Pache <npache@redhat.com>
Subject: selftests/mm: skip uffd hugetlb tests with insufficient hugepages
Date: Wed, 6 Mar 2024 15:37:13 -0700

Now that run_vmtests.sh does not guarantee that the correct hugepage count
is available, add a check inside the userfaultfd hugetlb test to verify
the nr_hugepages count before continuing.

Link: https://lkml.kernel.org/r/20240306223714.320681-3-npache@redhat.com
Signed-off-by: Nico Pache <npache@redhat.com>
Cc: Ben Hutchings <ben@decadent.org.uk>
Cc: Muchun Song <muchun.song@linux.dev>
Cc: Muhammad Usama Anjum <usama.anjum@collabora.com>
Cc: Shuah Khan <shuah@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 tools/testing/selftests/mm/uffd-stress.c |    6 ++++++
 1 file changed, 6 insertions(+)

--- a/tools/testing/selftests/mm/uffd-stress.c~selftests-mm-skip-uffd-hugetlb-tests-with-insufficient-hugepages
+++ a/tools/testing/selftests/mm/uffd-stress.c
@@ -441,6 +441,12 @@ int main(int argc, char **argv)
 	parse_test_type_arg(argv[1]);
 	bytes = atol(argv[2]) * 1024 * 1024;
 
+	if (test_type == TEST_HUGETLB &&
+	   get_free_hugepages() < bytes / page_size) {
+		printf("skip: Skipping userfaultfd... not enough hugepages\n");
+		return KSFT_SKIP;
+	}
+
 	nr_cpus = sysconf(_SC_NPROCESSORS_ONLN);
 
 	nr_pages_per_cpu = bytes / page_size / nr_cpus;
_

Patches currently in -mm which might be from npache@redhat.com are



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-03-12 20:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-12 20:07 [merged mm-stable] selftests-mm-skip-uffd-hugetlb-tests-with-insufficient-hugepages.patch removed from -mm tree 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.