Skip to content

Commit c3ed25a

Browse files
Merge pull request #823 from Mashimiao/add-cgroupspath-entry
config-linux.md: add cgroupsPath entry and some modifications
2 parents 198f23f + 1742fbf commit c3ed25a

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

config-linux.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -171,14 +171,18 @@ Also known as cgroups, they are used to restrict resource usage for a container
171171
cgroups provide controls (through controllers) to restrict cpu, memory, IO, pids and network for the container.
172172
For more information, see the [kernel cgroups documentation][cgroup-v1].
173173

174-
The path to the cgroups can be specified in the Spec via `cgroupsPath`.
175-
`cgroupsPath` can be used to either control the cgroup hierarchy for containers or to run a new process in an existing container.
176-
If `cgroupsPath` is:
177-
* ... an absolute path (starting with `/`), the runtime MUST take the path to be relative to the cgroup mount point.
178-
* ... a relative path (not starting with `/`), the runtime MAY interpret the path relative to a runtime-determined location in the cgroup hierarchy.
179-
* ... not specified, the runtime MAY define the default cgroup path.
174+
### <a name="configLinuxCgroupsPath" />Cgroups Path
175+
176+
**`cgroupsPath`** (string, OPTIONAL) path to the cgroups.
177+
It can be used to either control the cgroups hierarchy for containers or to run a new process in an existing container.
178+
179+
The value of `cgroupsPath` MUST be either an absolute path or a relative path.
180+
* In the case of an absolute path (starting with `/`), the runtime MUST take the path to be relative to the cgroups mount point.
181+
* In the case of a relative path (not starting with `/`), the runtime MAY interpret the path relative to a runtime-determined location in the cgroups hierarchy.
182+
183+
If the value is specified, the runtime MUST consistently attach to the same place in the cgroups hierarchy given the same value of `cgroupsPath`.
184+
If the value is not specified, the runtime MAY define the default cgroups path.
180185
Runtimes MAY consider certain `cgroupsPath` values to be invalid, and MUST generate an error if this is the case.
181-
If a `cgroupsPath` value is specified, the runtime MUST consistently attach to the same place in the cgroup hierarchy given the same value of `cgroupsPath`.
182186

183187
Implementations of the Spec can choose to name cgroups in any manner.
184188
The Spec does not include naming schema for cgroups.

0 commit comments

Comments
 (0)