path: root/Documentation/cgroups/hugetlb.txt
diff options
authorAnton Arapov <>2012-10-29 11:15:37 +0100
committerAnton Arapov <>2012-10-29 11:15:37 +0100
commit7d558cd9c7b18e4b16953265aa0da45e63f3b968 (patch)
tree7135d5a810768c9c619346282ee9cfdf1765e225 /Documentation/cgroups/hugetlb.txt
parent985ef6b2108ed28ffd5f6630e1e0fce2e2a775f2 (diff)
fedora kernel: cd394142aac30b5c751f25b517572e2448695641v3.6.3-2f17
Signed-off-by: Anton Arapov <>
Diffstat (limited to 'Documentation/cgroups/hugetlb.txt')
1 files changed, 45 insertions, 0 deletions
diff --git a/Documentation/cgroups/hugetlb.txt b/Documentation/cgroups/hugetlb.txt
new file mode 100644
index 00000000000..a9faaca1f02
--- /dev/null
+++ b/Documentation/cgroups/hugetlb.txt
@@ -0,0 +1,45 @@
+HugeTLB Controller
+The HugeTLB controller allows to limit the HugeTLB usage per control group and
+enforces the controller limit during page fault. Since HugeTLB doesn't
+support page reclaim, enforcing the limit at page fault time implies that,
+the application will get SIGBUS signal if it tries to access HugeTLB pages
+beyond its limit. This requires the application to know beforehand how much
+HugeTLB pages it would require for its use.
+HugeTLB controller can be created by first mounting the cgroup filesystem.
+# mount -t cgroup -o hugetlb none /sys/fs/cgroup
+With the above step, the initial or the parent HugeTLB group becomes
+visible at /sys/fs/cgroup. At bootup, this group includes all the tasks in
+the system. /sys/fs/cgroup/tasks lists the tasks in this cgroup.
+New groups can be created under the parent group /sys/fs/cgroup.
+# cd /sys/fs/cgroup
+# mkdir g1
+# echo $$ > g1/tasks
+The above steps create a new group g1 and move the current shell
+process (bash) into it.
+Brief summary of control files
+ hugetlb.<hugepagesize>.limit_in_bytes # set/show limit of "hugepagesize" hugetlb usage
+ hugetlb.<hugepagesize>.max_usage_in_bytes # show max "hugepagesize" hugetlb usage recorded
+ hugetlb.<hugepagesize>.usage_in_bytes # show current res_counter usage for "hugepagesize" hugetlb
+ hugetlb.<hugepagesize>.failcnt # show the number of allocation failure due to HugeTLB limit
+For a system supporting two hugepage size (16M and 16G) the control
+files include: