Skip to content

Commit 62106c1

Browse files
authored
Merge pull request #1279 from cyphar/pids-limit-0-value
linux: clarify pids cgroup settings
2 parents e3c8d12 + 869b2d5 commit 62106c1

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

config-linux.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,9 @@ For more information, see the kernel cgroups documentation about [pids][cgroup-v
666666

667667
The following parameters can be specified to set up the controller:
668668

669-
* **`limit`** *(int64, REQUIRED)* - specifies the maximum number of tasks in the cgroup
669+
* **`limit`** *(int64, OPTIONAL)* - specifies the maximum number of tasks in the cgroup, with `-1` indicating no limit (`max`).
670+
671+
> Note: Even though it may superficially seem redundant, `0` is a valid limit value for the `pids` cgroup controller from the kernel's perspective and SHOULD be treated as such by runtimes.
670672
671673
#### Example
672674

specs-go/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ type LinuxCPU struct {
434434
// LinuxPids for Linux cgroup 'pids' resource management (Linux 4.3)
435435
type LinuxPids struct {
436436
// Maximum number of PIDs. Default is "no limit".
437-
Limit int64 `json:"limit"`
437+
Limit *int64 `json:"limit,omitempty"`
438438
}
439439

440440
// LinuxNetwork identification and priority configuration

0 commit comments

Comments
 (0)