[RFC] docs/admin-guide/cgroup-v2: Add hugetlb rsvd files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Add missing docs about reservation accounting for hugetlb in cgroup v2.

Signed-off-by: Odin Ugedal <odin@xxxxxxx>
---
RFC: This is linking from cgroup-v1 docs, and that is probably not
optimal. The information about the difference between reservation
accounting and page fault accounting is pretty hard to make short.

I think we have four ways to do it, but I don't know what is
most optimal:

- Link from cgroup-v2 to cgroup-v1 (this patch)
- Have a separate description for both v1 and v2
- Move description from cgroup-v1 to cgroup-v2, and link from v1 to
  v2.
- Move info from cgroup-v1 to admin-guide/mm/hugetlbpage or
  vm/hugetlbfs_reserv, and link from cgroup to them.

admin-guide/cgroup-v1/hugetlb need some formatting anyhow also, will fix
that in the same patchset as this. Together with describing
<hugepagesize> in cgroup-v2.

 Documentation/admin-guide/cgroup-v2.rst | 23 +++++++++++++++++++++--
 1 file changed, 21 insertions(+), 2 deletions(-)

diff --git a/Documentation/admin-guide/cgroup-v2.rst b/Documentation/admin-guide/cgroup-v2.rst
index 64c62b979f2f..0a29cd46b1ab 100644
--- a/Documentation/admin-guide/cgroup-v2.rst
+++ b/Documentation/admin-guide/cgroup-v2.rst
@@ -2143,12 +2143,31 @@ RDMA Interface Files
 HugeTLB
 -------
 
-The HugeTLB controller allows to limit the HugeTLB usage per control group and
-enforces the controller limit during page fault.
+The "HugeTLB" controller regulates usage of huge pages. The controller
+supports two forms of accounting: page fault accounting and reservation
+accounting. See
+:ref:`Documentation/admin-guide/cgroup-v1/hugetlb.rst <cgroup-v1-hugetlb>`
+for more details.
+
 
 HugeTLB Interface Files
 ~~~~~~~~~~~~~~~~~~~~~~~
 
+  hugetlb.<hugepagesize>.rsvd.current
+	Show current reservations and no-reserve faults for "hugepagesize"
+	hugetlb.  It exists for all the cgroup except root.
+
+  hugetlb.<hugepagesize>.rsvd.max
+	Set/show the hard limit of reservations and no-reserve faults for
+	"hugepagesize" hugetlb. The default value is "max".
+	It exists for all the cgroup except root.
+
+  hugetlb.<hugepagesize>.rsvd.events
+	A read-only flat-keyed file which exists on non-root cgroups.
+
+	  max
+		The number of allocation failure due to HugeTLB reservation limit
+
   hugetlb.<hugepagesize>.current
 	Show current usage for "hugepagesize" hugetlb.  It exists for all
 	the cgroup except root.
-- 
2.31.1




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [Monitors]

  Powered by Linux