The patch titled Subject: mm-hugepages-add-hugetlb-vma-mremap-test-v8 has been added to the -mm tree. Its filename is mm-hugepages-add-hugetlb-vma-mremap-test-v8.patch This patch should soon appear at https://ozlabs.org/~akpm/mmots/broken-out/mm-hugepages-add-hugetlb-vma-mremap-test-v8.patch and later at https://ozlabs.org/~akpm/mmotm/broken-out/mm-hugepages-add-hugetlb-vma-mremap-test-v8.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Mina Almasry <almasrymina@xxxxxxxxxx> Subject: mm-hugepages-add-hugetlb-vma-mremap-test-v8 Link: https://lkml.kernel.org/r/20211014200542.4126947-2-almasrymina@xxxxxxxxxx Signed-off-by: Mina Almasry <almasrymina@xxxxxxxxxx> Acked-by: Mike Kravetz <mike.kravetz@xxxxxxxxxx> Cc: Ken Chen <kenchen@xxxxxxxxxx> Cc: Chris Kennelly <ckennelly@xxxxxxxxxx> Cc: Michal Hocko <mhocko@xxxxxxxx> Cc: Vlastimil Babka <vbabka@xxxxxxx> Cc: Kirill Shutemov <kirill@xxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- tools/testing/selftests/vm/hugepage-mremap.c | 10 +++------- tools/testing/selftests/vm/run_vmtests.sh | 11 +++++++++++ 2 files changed, 14 insertions(+), 7 deletions(-) --- a/tools/testing/selftests/vm/hugepage-mremap.c~mm-hugepages-add-hugetlb-vma-mremap-test-v8 +++ a/tools/testing/selftests/vm/hugepage-mremap.c @@ -3,12 +3,8 @@ * hugepage-mremap: * * Example of remapping huge page memory in a user application using the - * mremap system call. Before running this application, make sure that the - * administrator has mounted the hugetlbfs filesystem (on some directory - * like /mnt) using the command mount -t hugetlbfs nodev /mnt. In this - * example, the app is requesting memory of size 10MB that is backed by - * huge pages. - * + * mremap system call. Code assumes a hugetlbfs filesystem is mounted + * at './huge'. The code will use 10MB worth of huge pages. */ #define _GNU_SOURCE @@ -109,7 +105,7 @@ int main(void) { int ret = 0; - int fd = open("/mnt/huge/test", O_CREAT | O_RDWR, 0755); + int fd = open("/huge/test", O_CREAT | O_RDWR, 0755); if (fd < 0) { perror("Open failed"); --- a/tools/testing/selftests/vm/run_vmtests.sh~mm-hugepages-add-hugetlb-vma-mremap-test-v8 +++ a/tools/testing/selftests/vm/run_vmtests.sh @@ -108,6 +108,17 @@ else echo "[PASS]" fi +echo "-----------------------" +echo "running hugepage-mremap" +echo "-----------------------" +./hugepage-mremap +if [ $? -ne 0 ]; then + echo "[FAIL]" + exitcode=1 +else + echo "[PASS]" +fi + echo "NOTE: The above hugetlb tests provide minimal coverage. Use" echo " https://github.com/libhugetlbfs/libhugetlbfs.git for" echo " hugetlb regression testing." _ Patches currently in -mm which might be from almasrymina@xxxxxxxxxx are mm-hugepages-add-mremap-support-for-hugepage-backed-vma.patch mm-hugepages-add-hugetlb-vma-mremap-test.patch mm-hugepages-add-hugetlb-vma-mremap-test-v8.patch