]> git.baikalelectronics.ru Git - kernel.git/commit
hugetlb_cgroup: add hugetlb_cgroup reservation tests
authorMina Almasry <almasrymina@google.com>
Thu, 2 Apr 2020 04:11:38 +0000 (21:11 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 2 Apr 2020 16:35:32 +0000 (09:35 -0700)
commitb6ed9ab0fd923756dcc0bd9a919d6d18a5982ed6
tree013796401dbb7d9931727bd44afc421f3dee69ce
parent6b30f89f81212be02e7d4a96b2867f20681cf0cc
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 <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>
tools/testing/selftests/vm/.gitignore
tools/testing/selftests/vm/Makefile
tools/testing/selftests/vm/charge_reserved_hugetlb.sh [new file with mode: 0644]
tools/testing/selftests/vm/hugetlb_reparenting_test.sh [new file with mode: 0644]
tools/testing/selftests/vm/write_hugetlb_memory.sh [new file with mode: 0644]
tools/testing/selftests/vm/write_to_hugetlbfs.c [new file with mode: 0644]