]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
selftests/mm/uffd-stress: stricten constraint on free hugepages needed before the...
authorDev Jain <dev.jain@arm.com>
Tue, 9 Sep 2025 06:15:30 +0000 (11:45 +0530)
committerAndrew Morton <akpm@linux-foundation.org>
Sat, 13 Sep 2025 23:55:19 +0000 (16:55 -0700)
commit1580cd50b6d40af81fe48611ef7a60545eb8d40b
tree3c4e0f07cc93e9e843bea021d0e05187b51d7994
parent060b6c72ce94ebd1190842e81eb9675d7400c5f6
selftests/mm/uffd-stress: stricten constraint on free hugepages needed before the test

The test requires at least 2 * (bytes/page_size) hugetlb memory, since we
require identical number of hugepages for src and dst location.  Fix this.

Along with the above, as explained in patch "selftests/mm/uffd-stress:
Make test operate on less hugetlb memory", the racy nature of the test
requires that we have some extra number of hugepages left beyond what is
required.  Therefore, stricten this constraint.

Link: https://lkml.kernel.org/r/20250909061531.57272-3-dev.jain@arm.com
Fixes: 5a6aa60d1823 ("selftests/mm: skip uffd hugetlb tests with insufficient hugepages")
Signed-off-by: Dev Jain <dev.jain@arm.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: Liam Howlett <liam.howlett@oracle.com>
Cc: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Cc: Mariano Pache <npache@redhat.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: Ryan Roberts <ryan.roberts@arm.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
tools/testing/selftests/mm/uffd-stress.c