linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm, hugepages: fix size in hugetlb mremap() test
@ 2021-11-23 20:46 Yosry Ahmed
  2021-11-24  1:08 ` Mike Kravetz
  2021-11-24 20:38 ` [PATCH] mm, hugepages: make memory size variable in hugepage-mremap selftest Yosry Ahmed
  0 siblings, 2 replies; 6+ messages in thread
From: Yosry Ahmed @ 2021-11-23 20:46 UTC (permalink / raw)
  To: Andrew Morton, Shuah Khan
  Cc: linux-mm, linux-kselftest, linux-kernel, Mina Almasry, Yosry Ahmed

The hugetlb vma mremap() test mentions in the header comment that it
uses 10MB worth of huge pages, when it actually uses 1GB. This causes
the test to fail on devices with smaller memories.

Signed-off-by: Yosry Ahmed <yosryahmed@google.com>
---
 tools/testing/selftests/vm/hugepage-mremap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/vm/hugepage-mremap.c b/tools/testing/selftests/vm/hugepage-mremap.c
index 257df94697a5..551e68f97926 100644
--- a/tools/testing/selftests/vm/hugepage-mremap.c
+++ b/tools/testing/selftests/vm/hugepage-mremap.c
@@ -18,7 +18,7 @@
 #include <linux/userfaultfd.h>
 #include <sys/ioctl.h>
 
-#define LENGTH (1UL * 1024 * 1024 * 1024)
+#define LENGTH (10UL * 1024 * 1024)
 
 #define PROTECTION (PROT_READ | PROT_WRITE | PROT_EXEC)
 #define FLAGS (MAP_SHARED | MAP_ANONYMOUS)
-- 
2.34.0.rc2.393.gf8c9666880-goog



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-11-24 21:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-23 20:46 [PATCH] mm, hugepages: fix size in hugetlb mremap() test Yosry Ahmed
2021-11-24  1:08 ` Mike Kravetz
2021-11-24  2:19   ` Yosry Ahmed
2021-11-24  3:42     ` Mike Kravetz
2021-11-24 21:03       ` Mina Almasry
2021-11-24 20:38 ` [PATCH] mm, hugepages: make memory size variable in hugepage-mremap selftest Yosry Ahmed

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox