mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
libct/cg: add swapOnlyUsage in MemoryStats
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>
This commit is contained in:
@@ -31,6 +31,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.
|
||||
For cgroupv1, `Usage` and `Failcnt` are set by subtracting memory usage
|
||||
from memory+swap usage. For cgroupv2, `Usage`, `Limit`, and `MaxUsage`
|
||||
are set. (#4010)
|
||||
|
||||
### Fixed
|
||||
|
||||
|
||||
Reference in New Issue
Block a user