Skip to content

Commit 9d363b3

Browse files
committed
config-linux: add idle option for container cgroup
Signed-off-by: wineway <[email protected]>
1 parent 8958f93 commit 9d363b3

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
@@ -361,6 +361,7 @@ The following parameters can be specified to set up the controller:
361361
* **`realtimePeriod`** *(uint64, OPTIONAL)* - same as **`period`** but applies to realtime scheduler only
362362
* **`cpus`** *(string, OPTIONAL)* - list of CPUs the container will run in
363363
* **`mems`** *(string, OPTIONAL)* - list of Memory Nodes the container will run in
364+
* **`idle`** *(int64, OPTIONAL)* - cgroups are configured with minimum weight, 0: default behavior, 1: SCHED_IDLE.
364365

365366
#### Example
366367

@@ -372,7 +373,8 @@ The following parameters can be specified to set up the controller:
372373
"realtimeRuntime": 950000,
373374
"realtimePeriod": 1000000,
374375
"cpus": "2-3",
375-
"mems": "0-7"
376+
"mems": "0-7",
377+
"idle": 0
376378
}
377379
```
378380

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. Default 0
334+
Idle *int64 `json:"idle,omitempty"`
333335
}
334336

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

0 commit comments

Comments
 (0)