
The tests use both shared and private mapped hugetlb memory, and monitors the hugetlb usage counter as well as the hugetlb reservation counter. They test different configurations such as hugetlb memory usage via hugetlbfs, or MAP_HUGETLB, or shmget/shmat, and with and without MAP_POPULATE. Also add test for hugetlb reservation reparenting, since this is a subtle issue. Signed-off-by: Mina Almasry <almasrymina@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Tested-by: Sandipan Das <sandipan@linux.ibm.com> [powerpc64] Acked-by: Mike Kravetz <mike.kravetz@oracle.com> Cc: Sandipan Das <sandipan@linux.ibm.com> Cc: David Rientjes <rientjes@google.com> Cc: Greg Thelen <gthelen@google.com> Cc: Shakeel Butt <shakeelb@google.com> Cc: Shuah Khan <shuah@kernel.org> Link: http://lkml.kernel.org/r/20200211213128.73302-8-almasrymina@google.com Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
39 lines
1.1 KiB
Makefile
39 lines
1.1 KiB
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
# Makefile for vm selftests
|
|
uname_M := $(shell uname -m 2>/dev/null || echo not)
|
|
ARCH ?= $(shell echo $(uname_M) | sed -e 's/aarch64.*/arm64/')
|
|
|
|
CFLAGS = -Wall -I ../../../../usr/include $(EXTRA_CFLAGS)
|
|
LDLIBS = -lrt
|
|
TEST_GEN_FILES = compaction_test
|
|
TEST_GEN_FILES += gup_benchmark
|
|
TEST_GEN_FILES += hugepage-mmap
|
|
TEST_GEN_FILES += hugepage-shm
|
|
TEST_GEN_FILES += map_hugetlb
|
|
TEST_GEN_FILES += map_fixed_noreplace
|
|
TEST_GEN_FILES += map_populate
|
|
TEST_GEN_FILES += mlock-random-test
|
|
TEST_GEN_FILES += mlock2-tests
|
|
TEST_GEN_FILES += mremap_dontunmap
|
|
TEST_GEN_FILES += on-fault-limit
|
|
TEST_GEN_FILES += thuge-gen
|
|
TEST_GEN_FILES += transhuge-stress
|
|
TEST_GEN_FILES += userfaultfd
|
|
|
|
ifneq (,$(filter $(ARCH),arm64 ia64 mips64 parisc64 ppc64 riscv64 s390x sh64 sparc64 x86_64))
|
|
TEST_GEN_FILES += va_128TBswitch
|
|
TEST_GEN_FILES += virtual_address_range
|
|
TEST_GEN_FILES += write_to_hugetlbfs
|
|
endif
|
|
|
|
TEST_PROGS := run_vmtests
|
|
|
|
TEST_FILES := test_vmalloc.sh
|
|
|
|
KSFT_KHDR_INSTALL := 1
|
|
include ../lib.mk
|
|
|
|
$(OUTPUT)/userfaultfd: LDLIBS += -lpthread
|
|
|
|
$(OUTPUT)/mlock-random-test: LDLIBS += -lcap
|