-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[1.1] feat: add swapOnlyUsage in MemoryStats #4131
Conversation
/cc @kolyshkin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM (but I hope we'll release 1.2.0 soon rather than make more 1.1.x releases)
This field reports swap-only usage. For cgroupv1, `Usage` and `Failcnt` are set by subtracting memory usage from memory+swap usage. For cgroupv2, `Usage`, `Limit`, and `MaxUsage` are set. This commit also export `MaxUsage` of memory under cgroupv2 mode, using `memory.peak` introduced in kernel 5.19. Signed-off-by: Heran Yang <[email protected]> (cherry picked from commit 104b8dc) Signed-off-by: Harshal Patil <[email protected]>
@@ -46,6 +46,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 | |||
This aligns cgroupv2 root usage more closely with cgroupv1 reporting. | |||
Additionally, report root swap usage as sum of swap and memory usage, | |||
aligned with v1 and existing non-root v2 reporting. (#3933) | |||
* Add `swapOnlyUsage` in `MemoryStats`. This field reports swap-only usage. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these change logs are wrong, it should be removed.
This is a 1.1 backport of #4010