diff --git a/config-linux.md b/config-linux.md index ddc30ac4d..c354f74f4 100644 --- a/config-linux.md +++ b/config-linux.md @@ -564,7 +564,9 @@ For more information, see the kernel cgroups documentation about [pids][cgroup-v The following parameters can be specified to set up the controller: -* **`limit`** *(int64, REQUIRED)* - specifies the maximum number of tasks in the cgroup +* **`limit`** *(int64, REQUIRED)* - specifies the maximum number of tasks in the cgroup, with `-1` indicating no limit (`max`). + +> Note: Even though it superficially seems redundant, `0` is a valid limit value for the `pids` cgroup controller and SHOULD NOT be treated as a special value. #### Example diff --git a/specs-go/config.go b/specs-go/config.go index 1aa0693b5..60c028909 100644 --- a/specs-go/config.go +++ b/specs-go/config.go @@ -430,7 +430,7 @@ type LinuxCPU struct { // LinuxPids for Linux cgroup 'pids' resource management (Linux 4.3) type LinuxPids struct { // Maximum number of PIDs. Default is "no limit". - Limit int64 `json:"limit"` + Limit *int64 `json:"limit,omitempty"` } // LinuxNetwork identification and priority configuration