Skip to content

Commit

Permalink
Merge pull request #1136 from wineway/main
Browse files Browse the repository at this point in the history
config-linux: add idle option for container cgroup
  • Loading branch information
vbatts committed Apr 20, 2022
2 parents ba3abe1 + b8dbce9 commit e54040a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion config-linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,7 @@ The following parameters can be specified to set up the controller:
* **`realtimePeriod`** *(uint64, OPTIONAL)* - same as **`period`** but applies to realtime scheduler only
* **`cpus`** *(string, OPTIONAL)* - list of CPUs the container will run in
* **`mems`** *(string, OPTIONAL)* - list of Memory Nodes the container will run in
* **`idle`** *(int64, OPTIONAL)* - cgroups are configured with minimum weight, 0: default behavior, 1: SCHED_IDLE.

#### Example

Expand All @@ -376,7 +377,8 @@ The following parameters can be specified to set up the controller:
"realtimeRuntime": 950000,
"realtimePeriod": 1000000,
"cpus": "2-3",
"mems": "0-7"
"mems": "0-7",
"idle": 0
}
```

Expand Down
2 changes: 2 additions & 0 deletions specs-go/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,8 @@ type LinuxCPU struct {
Cpus string `json:"cpus,omitempty"`
// List of memory nodes in the cpuset. Default is to use any available memory node.
Mems string `json:"mems,omitempty"`
// cgroups are configured with minimum weight, 0: default behavior, 1: SCHED_IDLE.
Idle int64 `json:"idle"`
}

// LinuxPids for Linux cgroup 'pids' resource management (Linux 4.3)
Expand Down

0 comments on commit e54040a

Please sign in to comment.