Skip to content
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

Merged
merged 1 commit into from
Dec 12, 2023

Conversation

harche
Copy link

@harche harche commented Dec 4, 2023

This is a 1.1 backport of #4010

@harche
Copy link
Author

harche commented Dec 4, 2023

/cc @kolyshkin @haircommander @HeRaNO

@harche
Copy link
Author

harche commented Dec 7, 2023

/cc @kolyshkin

Copy link
Contributor

@kolyshkin kolyshkin left a 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 <heran55@126.com>
(cherry picked from commit 104b8dc)
Signed-off-by: Harshal Patil <harpatil@redhat.com>
@mrunalp mrunalp merged commit 75d99b4 into opencontainers:release-1.1 Dec 12, 2023
29 checks passed
@lifubang lifubang added this to the 1.1.11 milestone Dec 16, 2023
@lifubang lifubang added the backport/1.1-pr A backport to 1.1.x release. label Dec 16, 2023
@@ -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.
Copy link
Member

@lifubang lifubang Dec 16, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/1.1-pr A backport to 1.1.x release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants