overcommit libhugetlbfs and check the statistics
A message that is not in the archive (sent off-list or not yet received): 1240569569.757541291112654969.JavaMail.root@zmail06.collab.prod.int.phx2.redhat.com
PATCH v5 1/1 overcommit libhugetlbfs and check the statistics
libhugetlbfs 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.
---
v5: code cleanup
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 | 464 ++++++++++++++++++++ 2 files changed, 469 insertions(+), 0 deletions(-) create mode 100644 testcases/kernel/mem/hugetlb/hugemmap/hugemmap05.c
runtest/mm +5 -0
@@ -61,3 +61,8 @@ mmap10_3 mmap10 -a -s mmap10_4 mmap10 -a -s -c 60 ksm01 ksm01 + +hugemmap05 hugemmap05 +hugemmap05_1 hugemmap05 -m +hugemmap05_2 hugemmap05 -s +hugemmap05_3 hugemmap05 -s -m
testcases/kernel/mem/hugetlb/hugemmap/hugemmap05.c new file +464 -0
464 lines not on this page · raw message
Signature · 1 line
1.7.1
From: CAI Qian <[email protected]>
Date: Tue, 30 Nov 2010 17:36:03 +0800
Subject: [PATCH v5] overcommit libhugetlbfs and check the statistics
libhugetlbfs 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.
---
v5: code cleanup
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 | 464 ++++++++++++++++++++ 2 files changed, 469 insertions(+), 0 deletions(-) create mode 100644 testcases/kernel/mem/hugetlb/hugemmap/hugemmap05.c
runtest/mm +5 -0
@@ -61,3 +61,8 @@ mmap10_3 mmap10 -a -s mmap10_4 mmap10 -a -s -c 60 ksm01 ksm01 + +hugemmap05 hugemmap05 +hugemmap05_1 hugemmap05 -m +hugemmap05_2 hugemmap05 -s +hugemmap05_3 hugemmap05 -s -m
testcases/kernel/mem/hugetlb/hugemmap/hugemmap05.c new file +464 -0
464 lines not on this page · raw message
Signature · 1 line
1.7.1
------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! Tap into the largest installed PC base & get more eyes on your game by optimizing for Intel(R) Graphics Technology. Get started today with the Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list