* [PATCH] selftests/mm: Dont fail testsuite due to a lack of hugepages
@ 2024-03-01 7:33 Nico Pache
2024-03-01 9:28 ` Muhammad Usama Anjum
0 siblings, 1 reply; 4+ messages in thread
From: Nico Pache @ 2024-03-01 7:33 UTC (permalink / raw)
To: linux-mm, linux-kselftest, linux-kernel; +Cc: ben, shuah, akpm
On systems that have large core counts and large page sizes, but limited
memory, the userfaultfd test hugepage requirement is too large.
Exiting early due to missing one test's requirements is a rather aggressive
strategy, and prevents a lot of other tests from running. Remove the
early exit to prevent this.
Fixes: ee00479d6702 ("selftests: vm: Try harder to allocate huge pages")
Signed-off-by: Nico Pache <npache@redhat.com>
---
tools/testing/selftests/mm/run_vmtests.sh | 1 -
1 file changed, 1 deletion(-)
diff --git a/tools/testing/selftests/mm/run_vmtests.sh b/tools/testing/selftests/mm/run_vmtests.sh
index 246d53a5d7f28..727ea22ba408e 100755
--- a/tools/testing/selftests/mm/run_vmtests.sh
+++ b/tools/testing/selftests/mm/run_vmtests.sh
@@ -173,7 +173,6 @@ if [ -n "$freepgs" ] && [ -n "$hpgsize_KB" ]; then
if [ "$freepgs" -lt "$needpgs" ]; then
printf "Not enough huge pages available (%d < %d)\n" \
"$freepgs" "$needpgs"
- exit 1
fi
else
echo "no hugetlbfs support in kernel?"
--
2.43.0
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] selftests/mm: Dont fail testsuite due to a lack of hugepages 2024-03-01 7:33 [PATCH] selftests/mm: Dont fail testsuite due to a lack of hugepages Nico Pache @ 2024-03-01 9:28 ` Muhammad Usama Anjum 2024-03-04 19:08 ` Nico Pache 0 siblings, 1 reply; 4+ messages in thread From: Muhammad Usama Anjum @ 2024-03-01 9:28 UTC (permalink / raw) To: Nico Pache, linux-mm, linux-kselftest, linux-kernel Cc: Muhammad Usama Anjum, ben, shuah, akpm On 3/1/24 12:33 PM, Nico Pache wrote: > On systems that have large core counts and large page sizes, but limited > memory, the userfaultfd test hugepage requirement is too large. > > Exiting early due to missing one test's requirements is a rather aggressive > strategy, and prevents a lot of other tests from running. Remove the > early exit to prevent this. Why don't we only skip that particular test which requires huge number of pages instead? Thus the behavior of this script would remain same. > > Fixes: ee00479d6702 ("selftests: vm: Try harder to allocate huge pages") > Signed-off-by: Nico Pache <npache@redhat.com> > --- > tools/testing/selftests/mm/run_vmtests.sh | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/tools/testing/selftests/mm/run_vmtests.sh b/tools/testing/selftests/mm/run_vmtests.sh > index 246d53a5d7f28..727ea22ba408e 100755 > --- a/tools/testing/selftests/mm/run_vmtests.sh > +++ b/tools/testing/selftests/mm/run_vmtests.sh > @@ -173,7 +173,6 @@ if [ -n "$freepgs" ] && [ -n "$hpgsize_KB" ]; then > if [ "$freepgs" -lt "$needpgs" ]; then > printf "Not enough huge pages available (%d < %d)\n" \ > "$freepgs" "$needpgs" > - exit 1 > fi > else > echo "no hugetlbfs support in kernel?" -- BR, Muhammad Usama Anjum ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] selftests/mm: Dont fail testsuite due to a lack of hugepages 2024-03-01 9:28 ` Muhammad Usama Anjum @ 2024-03-04 19:08 ` Nico Pache 2024-03-05 5:49 ` Muhammad Usama Anjum 0 siblings, 1 reply; 4+ messages in thread From: Nico Pache @ 2024-03-04 19:08 UTC (permalink / raw) To: Muhammad Usama Anjum Cc: linux-mm, linux-kselftest, linux-kernel, ben, shuah, akpm On Fri, Mar 1, 2024 at 2:35 AM Muhammad Usama Anjum <usama.anjum@collabora.com> wrote: > > On 3/1/24 12:33 PM, Nico Pache wrote: > > On systems that have large core counts and large page sizes, but limited > > memory, the userfaultfd test hugepage requirement is too large. > > > > Exiting early due to missing one test's requirements is a rather aggressive > > strategy, and prevents a lot of other tests from running. Remove the > > early exit to prevent this. > Why don't we only skip that particular test which requires huge number of > pages instead? Thus the behavior of this script would remain same. Hi Muhammad, That would not solve the problem-- The issue is not with the userfaultfd test, but rather this part of the script that tries to allocate the hugepages. If it doesnt succeed at allocating the right amount of hugepages it will exit the run_vmtests.sh script, thus stopping all other tests. With the `exit` removed, the test suite is able to run, and upon running the userfaultfd test will result in a failed test case. If you'd like I can follow up with a patch to skip the test cases (in the actually test) rather than failing. Cheers, -- Nico > > > > > Fixes: ee00479d6702 ("selftests: vm: Try harder to allocate huge pages") > > Signed-off-by: Nico Pache <npache@redhat.com> > > --- > > tools/testing/selftests/mm/run_vmtests.sh | 1 - > > 1 file changed, 1 deletion(-) > > > > diff --git a/tools/testing/selftests/mm/run_vmtests.sh b/tools/testing/selftests/mm/run_vmtests.sh > > index 246d53a5d7f28..727ea22ba408e 100755 > > --- a/tools/testing/selftests/mm/run_vmtests.sh > > +++ b/tools/testing/selftests/mm/run_vmtests.sh > > @@ -173,7 +173,6 @@ if [ -n "$freepgs" ] && [ -n "$hpgsize_KB" ]; then > > if [ "$freepgs" -lt "$needpgs" ]; then > > printf "Not enough huge pages available (%d < %d)\n" \ > > "$freepgs" "$needpgs" > > - exit 1 > > fi > > else > > echo "no hugetlbfs support in kernel?" > > -- > BR, > Muhammad Usama Anjum > ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] selftests/mm: Dont fail testsuite due to a lack of hugepages 2024-03-04 19:08 ` Nico Pache @ 2024-03-05 5:49 ` Muhammad Usama Anjum 0 siblings, 0 replies; 4+ messages in thread From: Muhammad Usama Anjum @ 2024-03-05 5:49 UTC (permalink / raw) To: Nico Pache Cc: Muhammad Usama Anjum, linux-mm, linux-kselftest, linux-kernel, ben, shuah, akpm On 3/5/24 12:08 AM, Nico Pache wrote: > On Fri, Mar 1, 2024 at 2:35 AM Muhammad Usama Anjum > <usama.anjum@collabora.com> wrote: >> >> On 3/1/24 12:33 PM, Nico Pache wrote: >>> On systems that have large core counts and large page sizes, but limited >>> memory, the userfaultfd test hugepage requirement is too large. >>> >>> Exiting early due to missing one test's requirements is a rather aggressive >>> strategy, and prevents a lot of other tests from running. Remove the >>> early exit to prevent this. >> Why don't we only skip that particular test which requires huge number of >> pages instead? Thus the behavior of this script would remain same. > Hi Muhammad, > > That would not solve the problem-- The issue is not with the > userfaultfd test, but rather this part of the script that tries to > allocate the hugepages. If it doesnt succeed at allocating the right > amount of hugepages it will exit the run_vmtests.sh script, thus > stopping all other tests. With the `exit` removed, the test suite is > able to run, and upon running the userfaultfd test will result in a > failed test case. > > If you'd like I can follow up with a patch to skip the test cases (in > the actually test) rather than failing. Its just that we don't want failures if there are less number of huge pages available. CI people would mind finding failures. Tests should be updated to skip in those cases then. > > Cheers, > -- Nico >> >>> >>> Fixes: ee00479d6702 ("selftests: vm: Try harder to allocate huge pages") >>> Signed-off-by: Nico Pache <npache@redhat.com> >>> --- >>> tools/testing/selftests/mm/run_vmtests.sh | 1 - >>> 1 file changed, 1 deletion(-) >>> >>> diff --git a/tools/testing/selftests/mm/run_vmtests.sh b/tools/testing/selftests/mm/run_vmtests.sh >>> index 246d53a5d7f28..727ea22ba408e 100755 >>> --- a/tools/testing/selftests/mm/run_vmtests.sh >>> +++ b/tools/testing/selftests/mm/run_vmtests.sh >>> @@ -173,7 +173,6 @@ if [ -n "$freepgs" ] && [ -n "$hpgsize_KB" ]; then >>> if [ "$freepgs" -lt "$needpgs" ]; then >>> printf "Not enough huge pages available (%d < %d)\n" \ >>> "$freepgs" "$needpgs" >>> - exit 1 >>> fi >>> else >>> echo "no hugetlbfs support in kernel?" >> >> -- >> BR, >> Muhammad Usama Anjum >> > > -- BR, Muhammad Usama Anjum ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-03-05 5:49 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2024-03-01 7:33 [PATCH] selftests/mm: Dont fail testsuite due to a lack of hugepages Nico Pache 2024-03-01 9:28 ` Muhammad Usama Anjum 2024-03-04 19:08 ` Nico Pache 2024-03-05 5:49 ` Muhammad Usama Anjum
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox