Commit ef51409
committed
config-linux: Move 'disableOOMKiller' under 'memory'
It's backed by memory.oom_control, so this commit moves it in with
the rest of the memory-controller config.
Looking at the history, the initial request landing a setting for this
in the Docker/OCI ecosystem seems to be [1], which added
Cgroup.OomKillDisable. That commit was carried from libcontainer into
runC [2] where it is now Resources.OomKillDisable [3]. From runC it
was carried into this repo (with some renaming) in [4]. Subsequent
early doc updates landed in [5,6]. In none of those can I find
discussion about why the setting is not already under memory. I
expect the reason is that the runC structures are flat, so "under
memory" is not a thing there. But in this spec, resources has
per-controller sub-properties. The fact that disableOOMKiller
belonged to the memory controller may have been overlooked in [4] and
never revisited until now.
[1]: docker-archive/libcontainer#417
Subject: cgroups: add support for oom control
[2]: opencontainers/runc@295c708
Subject: cgroups: add support for oom control
[3]: https://github.com/opencontainers/runc/blob/v1.0.0-rc3/libcontainer/configs/cgroup_unix.go#L113-L114
[4]: opencontainers#51
Subject: Add Go types for specification
[5]: opencontainers#137
Subject: Adding cgroups path to the Spec.
[6]: opencontainers#199
Subject: runtime: config: linux: add cgroups informations
Signed-off-by: W. Trevor King <[email protected]>1 parent 06c488c commit ef51409
File tree
5 files changed
+19
-29
lines changed- schema
- test/config/good
- specs-go
5 files changed
+19
-29
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
253 | 253 | | |
254 | 254 | | |
255 | 255 | | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
272 | 256 | | |
273 | 257 | | |
274 | 258 | | |
| |||
282 | 266 | | |
283 | 267 | | |
284 | 268 | | |
285 | | - | |
| 269 | + | |
286 | 270 | | |
287 | 271 | | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
288 | 277 | | |
289 | 278 | | |
290 | 279 | | |
| |||
295 | 284 | | |
296 | 285 | | |
297 | 286 | | |
298 | | - | |
| 287 | + | |
| 288 | + | |
299 | 289 | | |
300 | 290 | | |
301 | 291 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
205 | | - | |
| 205 | + | |
206 | 206 | | |
207 | 207 | | |
208 | 208 | | |
| |||
710 | 710 | | |
711 | 711 | | |
712 | 712 | | |
713 | | - | |
| 713 | + | |
| 714 | + | |
714 | 715 | | |
715 | 716 | | |
716 | 717 | | |
| |||
721 | 722 | | |
722 | 723 | | |
723 | 724 | | |
724 | | - | |
725 | 725 | | |
726 | 726 | | |
727 | 727 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | 146 | | |
151 | 147 | | |
152 | 148 | | |
| |||
193 | 189 | | |
194 | 190 | | |
195 | 191 | | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
196 | 196 | | |
197 | 197 | | |
198 | 198 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
241 | 241 | | |
242 | 242 | | |
243 | 243 | | |
244 | | - | |
| 244 | + | |
| 245 | + | |
245 | 246 | | |
246 | 247 | | |
247 | 248 | | |
| |||
252 | 253 | | |
253 | 254 | | |
254 | 255 | | |
255 | | - | |
256 | 256 | | |
257 | 257 | | |
258 | 258 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
284 | 284 | | |
285 | 285 | | |
286 | 286 | | |
| 287 | + | |
| 288 | + | |
287 | 289 | | |
288 | 290 | | |
289 | 291 | | |
| |||
322 | 324 | | |
323 | 325 | | |
324 | 326 | | |
325 | | - | |
326 | | - | |
327 | 327 | | |
328 | 328 | | |
329 | 329 | | |
| |||
0 commit comments