Skip to content

[1.1] feat: add swapOnlyUsage in MemoryStats#4131

Merged
mrunalp merged 1 commit intoopencontainers:release-1.1from
harche:backport
Dec 12, 2023
Merged

[1.1] feat: add swapOnlyUsage in MemoryStats#4131
mrunalp merged 1 commit intoopencontainers:release-1.1from
harche:backport

Conversation

@harche
Copy link
Copy Markdown

@harche harche commented Dec 4, 2023

This is a 1.1 backport of #4010

@harche
Copy link
Copy Markdown
Author

harche commented Dec 4, 2023

/cc @kolyshkin @haircommander @HeRaNO

@harche
Copy link
Copy Markdown
Author

harche commented Dec 7, 2023

/cc @kolyshkin

Copy link
Copy Markdown
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
@lifubang lifubang added this to the 1.1.11 milestone Dec 16, 2023
@lifubang lifubang added the backport/1.1-pr A backport PR to release-1.1 label Dec 16, 2023
Comment thread CHANGELOG.md
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
Copy Markdown
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 PR to release-1.1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants