Skip to content

Commit 29750f7

Browse files
minatorvalds
authored andcommitted
hugetlb_cgroup: add hugetlb_cgroup reservation tests
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 <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Tested-by: Sandipan Das <[email protected]> [powerpc64] Acked-by: Mike Kravetz <[email protected]> Cc: Sandipan Das <[email protected]> Cc: David Rientjes <[email protected]> Cc: Greg Thelen <[email protected]> Cc: Shakeel Butt <[email protected]> Cc: Shuah Khan <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Linus Torvalds <[email protected]>
1 parent a9b3f86 commit 29750f7

File tree

6 files changed

+1086
-0
lines changed

6 files changed

+1086
-0
lines changed

tools/testing/selftests/vm/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@ virtual_address_range
1414
gup_benchmark
1515
va_128TBswitch
1616
map_fixed_noreplace
17+
write_to_hugetlbfs

tools/testing/selftests/vm/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ TEST_GEN_FILES += userfaultfd
2323
ifneq (,$(filter $(ARCH),arm64 ia64 mips64 parisc64 ppc64 riscv64 s390x sh64 sparc64 x86_64))
2424
TEST_GEN_FILES += va_128TBswitch
2525
TEST_GEN_FILES += virtual_address_range
26+
TEST_GEN_FILES += write_to_hugetlbfs
2627
endif
2728

2829
TEST_PROGS := run_vmtests

0 commit comments

Comments
 (0)