* [merged mm-hotfixes-stable] selftests-mm-restore-number-of-hugepages.patch removed from -mm tree
@ 2023-11-15 23:30 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2023-11-15 23:30 UTC (permalink / raw)
To: mm-commits, ryan.roberts, leitao, akpm
The quilt patch titled
Subject: selftests/mm: restore number of hugepages
has been removed from the -mm tree. Its filename was
selftests-mm-restore-number-of-hugepages.patch
This patch was dropped because it was merged into the mm-hotfixes-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Breno Leitao <leitao@debian.org>
Subject: selftests/mm: restore number of hugepages
Date: Fri, 3 Nov 2023 10:33:59 -0700
The test mm `hugetlb_fault_after_madv` selftest needs one and only one
huge page to run, thus it sets `/proc/sys/vm/nr_hugepages` to 1.
The problem is that further tests require the previous number of hugepages
allocated in order to succeed.
Save the number of huge pages before changing it, and restore it once the
test finishes, so, further tests could run successfully.
Link: https://lkml.kernel.org/r/20231103173400.1608403-1-leitao@debian.org
Fixes: 116d57303a05 ("selftests/mm: add a new test for madv and hugetlb")
Signed-off-by: Breno Leitao <leitao@debian.org>
Reported-by: Ryan Roberts <ryan.roberts@arm.com>
Closes: https://lore.kernel.org/all/662df57e-47f1-4c15-9b84-f2f2d587fc5c@arm.com/
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
tools/testing/selftests/mm/run_vmtests.sh | 3 +++
1 file changed, 3 insertions(+)
--- a/tools/testing/selftests/mm/run_vmtests.sh~selftests-mm-restore-number-of-hugepages
+++ a/tools/testing/selftests/mm/run_vmtests.sh
@@ -223,9 +223,12 @@ CATEGORY="hugetlb" run_test ./hugepage-m
CATEGORY="hugetlb" run_test ./hugepage-vmemmap
CATEGORY="hugetlb" run_test ./hugetlb-madvise
+nr_hugepages_tmp=$(cat /proc/sys/vm/nr_hugepages)
# For this test, we need one and just one huge page
echo 1 > /proc/sys/vm/nr_hugepages
CATEGORY="hugetlb" run_test ./hugetlb_fault_after_madv
+# Restore the previous number of huge pages, since further tests rely on it
+echo "$nr_hugepages_tmp" > /proc/sys/vm/nr_hugepages
if test_selected "hugetlb"; then
echo "NOTE: These hugetlb tests provide minimal coverage. Use"
_
Patches currently in -mm which might be from leitao@debian.org are
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-11-15 23:30 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-15 23:30 [merged mm-hotfixes-stable] selftests-mm-restore-number-of-hugepages.patch removed from -mm tree Andrew Morton
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).