On Mon, 7 Dec 2020 17:48:01 GMT, Severin Gehwolf <sgehw...@openjdk.org> wrote:
> This has been implemented for cgroups v1 with > [JDK-8250984](https://bugs.openjdk.java.net/browse/JDK-8250984) but was > lacking some tooling support for cgroups v2. With podman 2.2.0 release this > could now be implemented (and tested). The idea is the same as for the > cgroups v1 fix. If we've got no swap limit capabilities, return the memory > limit only. > > Note that for cgroups v2 doesn't implement CgroupV1Metrics (obviously) and, > thus, doesn't have `getMemoryAndSwapFailCount()` and > `getMemoryAndSwapMaxUsage()`. > > Testing: > - [x] submit testing > - [x] container tests on cgroups v2 with swapaccount=0. > - [x] Manual container tests involving `-XshowSettings:system` on cgroups v2. > > Thoughts? This pull request has now been integrated. Changeset: 66936111 Author: Severin Gehwolf <sgehw...@openjdk.org> URL: https://git.openjdk.java.net/jdk/commit/66936111 Stats: 45 lines in 2 files changed: 24 ins; 1 del; 20 mod 8253797: [cgroups v2] Account for the fact that swap accounting is disabled on some systems Reviewed-by: hseigel ------------- PR: https://git.openjdk.java.net/jdk/pull/1672