mirror of
https://github.com/torvalds/linux.git
synced 2026-08-09 00:45:33 +02:00
This is a preparatory commit. In the future, we want to be able to setup alias mappings for area_src and area_dst in the shmem test, like we do in the hugetlb_shared test. With a VMA obtained via mmap(MAP_ANONYMOUS | MAP_SHARED), it isn't clear how to do this. So, mmap() with an fd, so we can create alias mappings. Use memfd_create instead of actually passing in a tmpfs path like hugetlb does, since it's more convenient / simpler to run, and works just as well. Future commits will: 1. Setup the alias mappings. 2. Extend our tests to actually take advantage of this, to test new userfaultfd behavior being introduced in this series. Also, a small fix in the area we're changing: when the hugetlb setup fails in main(), pass in the right argv[] so we actually print out the hugetlb file path. Link: https://lkml.kernel.org/r/20210503180737.2487560-8-axelrasmussen@google.com Signed-off-by: Axel Rasmussen <axelrasmussen@google.com> Reviewed-by: Peter Xu <peterx@redhat.com> Cc: Alexander Viro <viro@zeniv.linux.org.uk> Cc: Andrea Arcangeli <aarcange@redhat.com> Cc: Brian Geffon <bgeffon@google.com> Cc: "Dr . David Alan Gilbert" <dgilbert@redhat.com> Cc: Hugh Dickins <hughd@google.com> Cc: Jerome Glisse <jglisse@redhat.com> Cc: Joe Perches <joe@perches.com> Cc: Kirill A. Shutemov <kirill@shutemov.name> Cc: Lokesh Gidra <lokeshgidra@google.com> Cc: Mike Kravetz <mike.kravetz@oracle.com> Cc: Mike Rapoport <rppt@linux.vnet.ibm.com> Cc: Mina Almasry <almasrymina@google.com> Cc: Oliver Upton <oupton@google.com> Cc: Shaohua Li <shli@fb.com> Cc: Shuah Khan <shuah@kernel.org> Cc: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Wang Qing <wangqing@vivo.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> |
||
|---|---|---|
| .. | ||
| .gitignore | ||
| charge_reserved_hugetlb.sh | ||
| check_config.sh | ||
| compaction_test.c | ||
| config | ||
| gup_test.c | ||
| hmm-tests.c | ||
| hugepage-mmap.c | ||
| hugepage-shm.c | ||
| hugetlb_reparenting_test.sh | ||
| khugepaged.c | ||
| Makefile | ||
| map_fixed_noreplace.c | ||
| map_hugetlb.c | ||
| map_populate.c | ||
| mlock-random-test.c | ||
| mlock2-tests.c | ||
| mlock2.h | ||
| mremap_dontunmap.c | ||
| mremap_test.c | ||
| on-fault-limit.c | ||
| pkey-helpers.h | ||
| pkey-powerpc.h | ||
| pkey-x86.h | ||
| protection_keys.c | ||
| run_vmtests.sh | ||
| split_huge_page_test.c | ||
| test_hmm.sh | ||
| test_vmalloc.sh | ||
| thuge-gen.c | ||
| transhuge-stress.c | ||
| userfaultfd.c | ||
| va_128TBswitch.c | ||
| virtual_address_range.c | ||
| write_hugetlb_memory.sh | ||
| write_to_hugetlbfs.c | ||