Skip to content

Commit e54040a

Browse files
authored
Merge pull request #1136 from wineway/main
config-linux: add idle option for container cgroup
2 parents ba3abe1 + b8dbce9 commit e54040a

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

config-linux.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,7 @@ The following parameters can be specified to set up the controller:
365365
* **`realtimePeriod`** *(uint64, OPTIONAL)* - same as **`period`** but applies to realtime scheduler only
366366
* **`cpus`** *(string, OPTIONAL)* - list of CPUs the container will run in
367367
* **`mems`** *(string, OPTIONAL)* - list of Memory Nodes the container will run in
368+
* **`idle`** *(int64, OPTIONAL)* - cgroups are configured with minimum weight, 0: default behavior, 1: SCHED_IDLE.
368369

369370
#### Example
370371

@@ -376,7 +377,8 @@ The following parameters can be specified to set up the controller:
376377
"realtimeRuntime": 950000,
377378
"realtimePeriod": 1000000,
378379
"cpus": "2-3",
379-
"mems": "0-7"
380+
"mems": "0-7",
381+
"idle": 0
380382
}
381383
```
382384

specs-go/config.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,8 @@ type LinuxCPU struct {
330330
Cpus string `json:"cpus,omitempty"`
331331
// List of memory nodes in the cpuset. Default is to use any available memory node.
332332
Mems string `json:"mems,omitempty"`
333+
// cgroups are configured with minimum weight, 0: default behavior, 1: SCHED_IDLE.
334+
Idle int64 `json:"idle"`
333335
}
334336

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

0 commit comments

Comments
 (0)