Skip to content

Commit c8fec52

Browse files
Merge pull request #860 from wking/remove-redundant-blkio
config-linux: Drop redundant 'blkio' prefix from blockIO properties
2 parents 10b5414 + d8ca338 commit c8fec52

File tree

6 files changed

+46
-46
lines changed

6 files changed

+46
-46
lines changed

config-linux.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -328,16 +328,16 @@ For more information, see the kernel cgroups documentation about [blkio][cgroup-
328328

329329
The following parameters can be specified to set up the controller:
330330

331-
* **`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.
332-
* **`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.
333-
* **`blkioWeightDevice`** *(array of objects, OPTIONAL)* - specifies the list of devices which will be bandwidth rate limited. The following parameters can be specified per-device:
331+
* **`weight`** *(uint16, OPTIONAL)* - specifies per-cgroup weight. This is default weight of the group on all devices until and unless overridden by per-device rules.
332+
* **`leafWeight`** *(uint16, OPTIONAL)* - equivalents of `weight` for the purpose of deciding how much weight tasks in the given cgroup has while competing with the cgroup's child cgroups.
333+
* **`weightDevice`** *(array of objects, OPTIONAL)* - specifies the list of devices which will be bandwidth rate limited. The following parameters can be specified per-device:
334334
* **`major, minor`** *(int64, REQUIRED)* - major, minor numbers for device. More info in [mknod(1)][mknod.1] man page.
335335
* **`weight`** *(uint16, OPTIONAL)* - bandwidth rate for the device.
336336
* **`leafWeight`** *(uint16, OPTIONAL)* - bandwidth rate for the device while competing with the cgroup's child cgroups, CFQ scheduler only
337337

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

340-
* **`blkioThrottleReadBpsDevice`**, **`blkioThrottleWriteBpsDevice`**, **`blkioThrottleReadIOPSDevice`**, **`blkioThrottleWriteIOPSDevice`** *(array of objects, OPTIONAL)* - specify the list of devices which will be IO rate limited.
340+
* **`throttleReadBpsDevice`**, **`throttleWriteBpsDevice`**, **`throttleReadIOPSDevice`**, **`throttleWriteIOPSDevice`** *(array of objects, OPTIONAL)* - specify the list of devices which will be IO rate limited.
341341
The following parameters can be specified per-device:
342342
* **`major, minor`** *(int64, REQUIRED)* - major, minor numbers for device. More info in [mknod(1)][mknod.1] man page.
343343
* **`rate`** *(uint64, REQUIRED)* - IO rate limit for the device
@@ -346,9 +346,9 @@ The following parameters can be specified to set up the controller:
346346

347347
```json
348348
"blockIO": {
349-
"blkioWeight": 10,
350-
"blkioLeafWeight": 10,
351-
"blkioWeightDevice": [
349+
"weight": 10,
350+
"leafWeight": 10,
351+
"weightDevice": [
352352
{
353353
"major": 8,
354354
"minor": 0,
@@ -361,14 +361,14 @@ The following parameters can be specified to set up the controller:
361361
"weight": 500
362362
}
363363
],
364-
"blkioThrottleReadBpsDevice": [
364+
"throttleReadBpsDevice": [
365365
{
366366
"major": 8,
367367
"minor": 0,
368368
"rate": 600
369369
}
370370
],
371-
"blkioThrottleWriteIOPSDevice": [
371+
"throttleWriteIOPSDevice": [
372372
{
373373
"major": 8,
374374
"minor": 16,

config.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -750,9 +750,9 @@ Here is a full example `config.json` for reference.
750750
}
751751
],
752752
"blockIO": {
753-
"blkioWeight": 10,
754-
"blkioLeafWeight": 10,
755-
"blkioWeightDevice": [
753+
"weight": 10,
754+
"leafWeight": 10,
755+
"weightDevice": [
756756
{
757757
"major": 8,
758758
"minor": 0,
@@ -765,14 +765,14 @@ Here is a full example `config.json` for reference.
765765
"weight": 500
766766
}
767767
],
768-
"blkioThrottleReadBpsDevice": [
768+
"throttleReadBpsDevice": [
769769
{
770770
"major": 8,
771771
"minor": 0,
772772
"rate": 600
773773
}
774774
],
775-
"blkioThrottleWriteIOPSDevice": [
775+
"throttleWriteIOPSDevice": [
776776
{
777777
"major": 8,
778778
"minor": 16,

schema/config-linux.json

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -64,44 +64,44 @@
6464
"id": "https://opencontainers.org/schema/bundle/linux/resources/blockIO",
6565
"type": "object",
6666
"properties": {
67-
"blkioWeight": {
68-
"id": "https://opencontainers.org/schema/bundle/linux/resources/blockIO/blkioWeight",
69-
"$ref": "defs-linux.json#/definitions/blkioWeight"
67+
"weight": {
68+
"id": "https://opencontainers.org/schema/bundle/linux/resources/blockIO/weight",
69+
"$ref": "defs-linux.json#/definitions/weight"
7070
},
71-
"blkioLeafWeight": {
72-
"id": "https://opencontainers.org/schema/bundle/linux/resources/blockIO/blkioLeafWeight",
73-
"$ref": "defs-linux.json#/definitions/blkioWeight"
71+
"leafWeight": {
72+
"id": "https://opencontainers.org/schema/bundle/linux/resources/blockIO/leafWeight",
73+
"$ref": "defs-linux.json#/definitions/weight"
7474
},
75-
"blkioThrottleReadBpsDevice": {
76-
"id": "https://opencontainers.org/schema/bundle/linux/resources/blockIO/blkioThrottleReadBpsDevice",
75+
"throttleReadBpsDevice": {
76+
"id": "https://opencontainers.org/schema/bundle/linux/resources/blockIO/throttleReadBpsDevice",
7777
"type": "array",
7878
"items": {
7979
"$ref": "defs-linux.json#/definitions/blockIODeviceThrottle"
8080
}
8181
},
82-
"blkioThrottleWriteBpsDevice": {
83-
"id": "https://opencontainers.org/schema/bundle/linux/resources/blockIO/blkioThrottleWriteBpsDevice",
82+
"throttleWriteBpsDevice": {
83+
"id": "https://opencontainers.org/schema/bundle/linux/resources/blockIO/throttleWriteBpsDevice",
8484
"type": "array",
8585
"items": {
8686
"$ref": "defs-linux.json#/definitions/blockIODeviceThrottle"
8787
}
8888
},
89-
"blkioThrottleReadIopsDevice": {
90-
"id": "https://opencontainers.org/schema/bundle/linux/resources/blockIO/blkioThrottleReadIopsDevice",
89+
"throttleReadIopsDevice": {
90+
"id": "https://opencontainers.org/schema/bundle/linux/resources/blockIO/throttleReadIopsDevice",
9191
"type": "array",
9292
"items": {
9393
"$ref": "defs-linux.json#/definitions/blockIODeviceThrottle"
9494
}
9595
},
96-
"blkioThrottleWriteIopsDevice": {
97-
"id": "https://opencontainers.org/schema/bundle/linux/resources/blockIO/blkioThrottleWriteIopsDevice",
96+
"throttleWriteIopsDevice": {
97+
"id": "https://opencontainers.org/schema/bundle/linux/resources/blockIO/throttleWriteIopsDevice",
9898
"type": "array",
9999
"items": {
100100
"$ref": "defs-linux.json#/definitions/blockIODeviceThrottle"
101101
}
102102
},
103-
"blkioWeightDevice": {
104-
"id": "https://opencontainers.org/schema/bundle/linux/resources/blockIO/blkioWeightDevice",
103+
"weightDevice": {
104+
"id": "https://opencontainers.org/schema/bundle/linux/resources/blockIO/weightDevice",
105105
"type": "array",
106106
"items": {
107107
"$ref": "defs-linux.json#/definitions/blockIODeviceWeight"

schema/defs-linux.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@
144144
}
145145
}
146146
},
147-
"blkioWeight": {
147+
"weight": {
148148
"type": "integer"
149149
},
150150
"blockIODevice": {
@@ -172,10 +172,10 @@
172172
"type": "object",
173173
"properties": {
174174
"weight": {
175-
"$ref": "#/definitions/blkioWeight"
175+
"$ref": "#/definitions/weight"
176176
},
177177
"leafWeight": {
178-
"$ref": "#/definitions/blkioWeight"
178+
"$ref": "#/definitions/weight"
179179
}
180180
}
181181
}

schema/test/config/good/spec-example.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -278,9 +278,9 @@
278278
}
279279
],
280280
"blockIO": {
281-
"blkioWeight": 10,
282-
"blkioLeafWeight": 10,
283-
"blkioWeightDevice": [
281+
"weight": 10,
282+
"leafWeight": 10,
283+
"weightDevice": [
284284
{
285285
"major": 8,
286286
"minor": 0,
@@ -293,14 +293,14 @@
293293
"weight": 500
294294
}
295295
],
296-
"blkioThrottleReadBpsDevice": [
296+
"throttleReadBpsDevice": [
297297
{
298298
"major": 8,
299299
"minor": 0,
300300
"rate": 600
301301
}
302302
],
303-
"blkioThrottleWriteIOPSDevice": [
303+
"throttleWriteIOPSDevice": [
304304
{
305305
"major": 8,
306306
"minor": 16,

specs-go/config.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ type linuxBlockIODevice struct {
248248
Minor int64 `json:"minor"`
249249
}
250250

251-
// LinuxWeightDevice struct holds a `major:minor weight` pair for blkioWeightDevice
251+
// LinuxWeightDevice struct holds a `major:minor weight` pair for weightDevice
252252
type LinuxWeightDevice struct {
253253
linuxBlockIODevice
254254
// Weight is the bandwidth rate for the device.
@@ -267,19 +267,19 @@ type LinuxThrottleDevice struct {
267267
// LinuxBlockIO for Linux cgroup 'blkio' resource management
268268
type LinuxBlockIO struct {
269269
// Specifies per cgroup weight
270-
Weight *uint16 `json:"blkioWeight,omitempty"`
270+
Weight *uint16 `json:"weight,omitempty"`
271271
// Specifies tasks' weight in the given cgroup while competing with the cgroup's child cgroups, CFQ scheduler only
272-
LeafWeight *uint16 `json:"blkioLeafWeight,omitempty"`
272+
LeafWeight *uint16 `json:"leafWeight,omitempty"`
273273
// Weight per cgroup per device, can override BlkioWeight
274-
WeightDevice []LinuxWeightDevice `json:"blkioWeightDevice,omitempty"`
274+
WeightDevice []LinuxWeightDevice `json:"weightDevice,omitempty"`
275275
// IO read rate limit per cgroup per device, bytes per second
276-
ThrottleReadBpsDevice []LinuxThrottleDevice `json:"blkioThrottleReadBpsDevice,omitempty"`
276+
ThrottleReadBpsDevice []LinuxThrottleDevice `json:"throttleReadBpsDevice,omitempty"`
277277
// IO write rate limit per cgroup per device, bytes per second
278-
ThrottleWriteBpsDevice []LinuxThrottleDevice `json:"blkioThrottleWriteBpsDevice,omitempty"`
278+
ThrottleWriteBpsDevice []LinuxThrottleDevice `json:"throttleWriteBpsDevice,omitempty"`
279279
// IO read rate limit per cgroup per device, IO per second
280-
ThrottleReadIOPSDevice []LinuxThrottleDevice `json:"blkioThrottleReadIOPSDevice,omitempty"`
280+
ThrottleReadIOPSDevice []LinuxThrottleDevice `json:"throttleReadIOPSDevice,omitempty"`
281281
// IO write rate limit per cgroup per device, IO per second
282-
ThrottleWriteIOPSDevice []LinuxThrottleDevice `json:"blkioThrottleWriteIOPSDevice,omitempty"`
282+
ThrottleWriteIOPSDevice []LinuxThrottleDevice `json:"throttleWriteIOPSDevice,omitempty"`
283283
}
284284

285285
// LinuxMemory for Linux cgroup 'memory' resource management

0 commit comments

Comments
 (0)