overcommit libhugetlbfs and check the statistics
PATCH v4 1/1 overcommit libhugetlbfs and check the statistics
In reply to a message not in the archivelibhugetlbfs allows to overcommit hugepages and there are tunables in sysfs and procfs. The test here want to ensure it is possible to overcommit by either mmap or shared memory. Also ensure those reservation can be read/write, and several statistics work correctly.
First, it resets nr_hugepages and nr_overcommit_hugepages. Then, set both to a specify value - N, and allocate N + %50 x N hugepages. Finally, it reads and writes every page. There are command options to choose either to manage hugepages from sysfs or procfs, and reserve them by mmap or shmget.
---
v4: cleanup from Garrett's feedback.
v3: fix -a option description; fix a nasty bug with tst_exit which skips
cleanup at the end of the test; add more information to assist test debug.
v2: add more explanation and a command-line option to specify memory
allocation size.
runtest/mm | 5 + testcases/kernel/mem/hugetlb/hugemmap/hugemmap05.c | 512 ++++++++++++++++++++ 2 files changed, 517 insertions(+), 0 deletions(-) create mode 100644 testcases/kernel/mem/hugetlb/hugemmap/hugemmap05.c
runtest/mm +5 -0
@@ -59,3 +59,8 @@ mmap10_1 mmap10 -a mmap10_2 mmap10 -s mmap10_3 mmap10 -a -s mmap10_4 mmap10 -a -s -c 60 + +hugemmap05 hugemmap05 +hugemmap05_1 hugemmap05 -m +hugemmap05_2 hugemmap05 -s +hugemmap05_3 hugemmap05 -s -m
testcases/kernel/mem/hugetlb/hugemmap/hugemmap05.c new file +512 -0
512 lines not on this page · raw message
Signature · 1 line
1.7.1
------------------------------------------------------------------------------
The Next 800 Companies to Lead America's Growth: New Video Whitepaper David G. Thomson, author of the best-selling book "Blueprint to a Billion" shares his insights and actions to help propel your business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list