All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC] docs/admin-guide/cgroup-v2: Add hugetlb rsvd files
@ 2021-04-16 14:11 Odin Ugedal
       [not found] ` <20210416141146.542786-1-odin-RObV4cXtwVA@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Odin Ugedal @ 2021-04-16 14:11 UTC (permalink / raw)
  To: corbet; +Cc: cgroups, linux-doc, Odin Ugedal

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

Signed-off-by: Odin Ugedal <odin@uged.al>
---
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


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-04-25  9:22 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-16 14:11 [RFC] docs/admin-guide/cgroup-v2: Add hugetlb rsvd files Odin Ugedal
     [not found] ` <20210416141146.542786-1-odin-RObV4cXtwVA@public.gmane.org>
2021-04-16 20:45   ` Tejun Heo
2021-04-16 20:45     ` Tejun Heo
     [not found]     ` <YHn3cifQv1FUOqfU-NiLfg/pYEd1N0TnZuCh8vA@public.gmane.org>
2021-04-19 14:51       ` Johannes Weiner
2021-04-19 14:51         ` Johannes Weiner
     [not found]         ` <YH2Y9FucBW2GLLLQ-druUgvl0LCNAfugRpC6u6w@public.gmane.org>
2021-04-25  9:22           ` Odin Ugedal
2021-04-25  9:22             ` Odin Ugedal

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.