Skip to content

Commit

Permalink
Remove range limit which depend on kernel
Browse files Browse the repository at this point in the history
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
  • Loading branch information
hqhq committed Apr 26, 2017
1 parent f227620 commit ce55de2
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 15 deletions.
8 changes: 4 additions & 4 deletions config-linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -352,14 +352,14 @@ For more information, see [the kernel cgroups documentation about blkio][cgroup-

The following parameters can be specified to setup the controller:

* **`blkioWeight`** *(uint16, OPTIONAL)* - specifies per-cgroup weight. This is default weight of the group on all devices until and unless overridden by per-device rules. The range is from 10 to 1000.
* **`blkioWeight`** *(uint16, OPTIONAL)* - specifies per-cgroup weight. This is default weight of the group on all devices until and unless overridden by per-device rules.

* **`blkioLeafWeight`** *(uint16, OPTIONAL)* - equivalents of `blkioWeight` for the purpose of deciding how much weight tasks in the given cgroup has while competing with the cgroup's child cgroups. The range is from 10 to 1000.
* **`blkioLeafWeight`** *(uint16, OPTIONAL)* - equivalents of `blkioWeight` for the purpose of deciding how much weight tasks in the given cgroup has while competing with the cgroup's child cgroups.

* **`blkioWeightDevice`** *(array of objects, OPTIONAL)* - specifies the list of devices which will be bandwidth rate limited. The following parameters can be specified per-device:
* **`major, minor`** *(int64, REQUIRED)* - major, minor numbers for device. More info in `man mknod`.
* **`weight`** *(uint16, OPTIONAL)* - bandwidth rate for the device, range is from 10 to 1000
* **`leafWeight`** *(uint16, OPTIONAL)* - bandwidth rate for the device while competing with the cgroup's child cgroups, range is from 10 to 1000, CFQ scheduler only
* **`weight`** *(uint16, OPTIONAL)* - bandwidth rate for the device.
* **`leafWeight`** *(uint16, OPTIONAL)* - bandwidth rate for the device while competing with the cgroup's child cgroups, CFQ scheduler only

You MUST specify at least one of `weight` or `leafWeight` in a given entry, and MAY specify both.

Expand Down
2 changes: 1 addition & 1 deletion config-windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ The following parameters can be specified:

* **`count`** *(uint64, OPTIONAL)* - specifies the number of CPUs available to the container.

* **`shares`** *(uint16, OPTIONAL)* - specifies the relative weight to other containers with CPU shares. The range is from 1 to 10000.
* **`shares`** *(uint16, OPTIONAL)* - specifies the relative weight to other containers with CPU shares.

* **`percent`** *(uint, OPTIONAL)* - specifies the percentage of available CPUs usable by the container.

Expand Down
2 changes: 0 additions & 2 deletions schema/config-linux.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@
"oomScoreAdj": {
"id": "https://opencontainers.org/schema/bundle/linux/resources/oomScoreAdj",
"type": "integer",
"minimum": -1000,
"maximum": 1000
},
"pids": {
"id": "https://opencontainers.org/schema/bundle/linux/resources/pids",
Expand Down
2 changes: 0 additions & 2 deletions schema/defs-linux.json
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,6 @@
},
"blkioWeight": {
"type": "integer",
"minimum": 10,
"maximum": 1000
},
"blockIODevice": {
"type": "object",
Expand Down
2 changes: 0 additions & 2 deletions schema/defs-windows.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
"cpuShares": {
"description": "Relative weight to other containers with CPU Shares defined",
"type": "integer",
"minimum": 1,
"maximum": 10000
}
}
}
8 changes: 4 additions & 4 deletions specs-go/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,9 +250,9 @@ type linuxBlockIODevice struct {
// LinuxWeightDevice struct holds a `major:minor weight` pair for blkioWeightDevice
type LinuxWeightDevice struct {
linuxBlockIODevice
// Weight is the bandwidth rate for the device, range is from 10 to 1000
// Weight is the bandwidth rate for the device.
Weight *uint16 `json:"weight,omitempty"`
// LeafWeight is the bandwidth rate for the device while competing with the cgroup's child cgroups, range is from 10 to 1000, CFQ scheduler only
// LeafWeight is the bandwidth rate for the device while competing with the cgroup's child cgroups, CFQ scheduler only
LeafWeight *uint16 `json:"leafWeight,omitempty"`
}

Expand All @@ -265,9 +265,9 @@ type LinuxThrottleDevice struct {

// LinuxBlockIO for Linux cgroup 'blkio' resource management
type LinuxBlockIO struct {
// Specifies per cgroup weight, range is from 10 to 1000
// Specifies per cgroup weight
Weight *uint16 `json:"blkioWeight,omitempty"`
// Specifies tasks' weight in the given cgroup while competing with the cgroup's child cgroups, range is from 10 to 1000, CFQ scheduler only
// Specifies tasks' weight in the given cgroup while competing with the cgroup's child cgroups, CFQ scheduler only
LeafWeight *uint16 `json:"blkioLeafWeight,omitempty"`
// Weight per cgroup per device, can override BlkioWeight
WeightDevice []LinuxWeightDevice `json:"blkioWeightDevice,omitempty"`
Expand Down

0 comments on commit ce55de2

Please sign in to comment.