[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210218195549.1696769-3-vipinsh@google.com>
Date: Thu, 18 Feb 2021 11:55:49 -0800
From: Vipin Sharma <vipinsh@...gle.com>
To: tj@...nel.org, thomas.lendacky@....com, brijesh.singh@....com,
jon.grimm@....com, eric.vantassell@....com, pbonzini@...hat.com,
hannes@...xchg.org, frankja@...ux.ibm.com, borntraeger@...ibm.com
Cc: corbet@....net, seanjc@...gle.com, vkuznets@...hat.com,
wanpengli@...cent.com, jmattson@...gle.com, joro@...tes.org,
tglx@...utronix.de, mingo@...hat.com, bp@...en8.de, hpa@...or.com,
gingell@...gle.com, rientjes@...gle.com, dionnaglaze@...gle.com,
kvm@...r.kernel.org, x86@...nel.org, cgroups@...r.kernel.org,
linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
Vipin Sharma <vipinsh@...gle.com>
Subject: [RFC 2/2] cgroup: sev: Miscellaneous cgroup documentation.
Documentation of miscellaneous cgroup controller. This new controller is
used to track and limit usage of scalar resources.
Signed-off-by: Vipin Sharma <vipinsh@...gle.com>
Reviewed-by: David Rientjes <rientjes@...gle.com>
---
Documentation/admin-guide/cgroup-v1/misc.rst | 1 +
Documentation/admin-guide/cgroup-v2.rst | 64 +++++++++++++++++++-
2 files changed, 63 insertions(+), 2 deletions(-)
create mode 100644 Documentation/admin-guide/cgroup-v1/misc.rst
diff --git a/Documentation/admin-guide/cgroup-v1/misc.rst b/Documentation/admin-guide/cgroup-v1/misc.rst
new file mode 100644
index 000000000000..8e9e9311daeb
--- /dev/null
+++ b/Documentation/admin-guide/cgroup-v1/misc.rst
@@ -0,0 +1 @@
+/Documentation/admin-guide/cgroup-v2.rst
diff --git a/Documentation/admin-guide/cgroup-v2.rst b/Documentation/admin-guide/cgroup-v2.rst
index 1de8695c264b..1a41a3623b9b 100644
--- a/Documentation/admin-guide/cgroup-v2.rst
+++ b/Documentation/admin-guide/cgroup-v2.rst
@@ -63,8 +63,11 @@ v1 is available under :ref:`Documentation/admin-guide/cgroup-v1/index.rst <cgrou
5-7-1. RDMA Interface Files
5-8. HugeTLB
5.8-1. HugeTLB Interface Files
- 5-8. Misc
- 5-8-1. perf_event
+ 5-9. Misc
+ 5.9-1 Miscellaneous cgroup Interface Files
+ 5.9-2 Migration and Ownership
+ 5-10. Others
+ 5-10-1. perf_event
5-N. Non-normative information
5-N-1. CPU controller root cgroup process behaviour
5-N-2. IO controller root cgroup process behaviour
@@ -2161,6 +2164,63 @@ HugeTLB Interface Files
generated on this file reflects only the local events.
Misc
+--------------
+
+The Miscellaneous cgroup provides the resource allocation and tracking
+mechanism for the scalar resources which cannot be abstracted like the other
+cgroup resources. Controller is enabled by the CONFIG_CGROUP_MISC config
+option.
+
+The first two resources added to the miscellaneous controller are Secure
+Encrypted Virtualization (SEV) ASIDs and SEV - Encrypted State (SEV-ES) ASIDs.
+These limited ASIDs are used for encrypting virtual machines memory on the AMD
+platform.
+
+Misc Interface Files
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Miscellaneous controller provides 3 interface files:
+
+ misc.capacity
+ A read-only flat-keyed file shown only in the root cgroup. It shows
+ miscellaneous scalar resources available on the platform along with
+ their quantities::
+ $ cat misc.capacity
+ sev 50
+ sev_es 10
+
+ misc.current
+ A read-only flat-keyed file shown in the non-root cgroups. It shows
+ the current usage of the resources in the cgroup and its children.::
+ $ cat misc.current
+ sev 3
+ sev_es 0
+
+ misc.max
+ A read-write flat-keyed file shown in the non root cgroups. Allowed
+ maximum usage of the resources in the cgroup and its children.::
+ $ cat misc.max
+ sev max
+ sev_es 4
+
+ Limit can be set by::
+ # echo sev 1 > misc.max
+
+ Limit can be set to max by::
+ # echo sev max > misc.max
+
+ Limits can be set more than the capacity value in the misc.capacity
+ file.
+
+Migration and Ownership
+~~~~~~~~~~~~~~~~~~~~~~~
+
+A miscellaneous scalar resource is charged to the cgroup in which it is used
+first, and stays charged to that cgroup until that resource is freed. Migrating
+a process to a different cgroup do not move the charge to the destination
+cgroup where the process has moved.
+
+Others
----
perf_event
--
2.30.0.617.g56c4b15f3c-goog
Powered by blists - more mailing lists