-
Couldn't load subscription status.
- Fork 590
config-linux: add memory.checkBeforeUpdate #1158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -336,6 +336,11 @@ The following properties do not specify memory limits, but are covered by the `m | |
| To disable it, specify a value of `true`. | ||
| * **`useHierarchy`** *(bool, OPTIONAL)* - enables or disables hierarchical memory accounting. | ||
| If enabled (`true`), child cgroups will share the memory limits of this cgroup. | ||
| * **`checkBeforeUpdate`** *(bool, OPTIONAL)* - enables container memory usage check before setting a new limit. | ||
| If enabled (`true`), runtime MAY check if a new memory limit is lower than the current usage, and MUST | ||
| reject the new limit. Practically, when cgroup v1 is used, the kernel rejects the limit lower than the | ||
| current usage, and when cgroup v2 is used, an OOM killer is invoked. This setting can be used on | ||
| cgroup v2 to mimic the cgroup v1 behavior. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we call out that there is TOCTOU race possible here and it won't be able to exactly match cgroups v1 behavior? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To me this is an implementation detail, and this is merely a spec. In fact it should not even explain why we need it, but I guess some context would not hurt. |
||
|
|
||
| #### Example | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -169,6 +169,9 @@ | |
| }, | ||
| "useHierarchy": { | ||
| "type": "boolean" | ||
| }, | ||
| "checkBeforeUpdate": { | ||
| "type": "boolean" | ||
| } | ||
| } | ||
| }, | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.