[jdk11u-dev] RFR: 8231111: Cgroups v2: Rework Metrics in java.base so as to recognize unified hierarchy [v9]
Zhengyu Gu
zgu at openjdk.java.net
Thu Mar 17 21:03:36 UTC 2022
On Thu, 17 Mar 2022 17:40:06 GMT, Zhengyu Gu <zgu at openjdk.org> wrote:
>> This is a followup backport for Cgroup v2 support.
>>
>> The original patch does not apply cleanly, due to context differences and some of out-of-order backports, conflicts were resolved manually.
>>
>> In additional:
>>
>> 1) Include partial backport of JDK-8250627.
>> - Renamed `Metrics.c` => `CgroupMetrics.c`
>> - Added native method `isUseContainerSupport()` to `CgroupMetrics.java`
>> - Return instance only if `isUseContainerSupport()` is enabled.
>>
>> 2) Add `createTempDirectory()` method to `test/lib/jdk/test/lib/Utils.java` for `TestCgroupSubsystemController.java` test
>>
>> 3) Add `import jdk.test.lib.process.OutputAnalyzer;` to `TestDockerMemoryMetrics.java`
>>
>> Test:
>>
>> - [x] jtreg containers/docker test on Ubuntu 20.04.4 LTS
>> - [x] jdk/internal/platform/cgroup on Ubuntu 20.04.4 LTS
>> - [x] jdk/internal/platform/docker on Ubuntu 20.04.4 LTS
>
> Zhengyu Gu has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 13 commits:
>
> - Merge
> - Merge
> - Merge branch 'master' into backport-8231111-unified-hierarchy
> - Fixes
> - Fix MetricsTesterCgroupV1
> - More fixes
> - Fix indents and whitespaces
> - Redo CgroupV1Subsystem.java merge
> - Severin's comments - 2
> - Severin's comments
> - ... and 3 more: https://git.openjdk.java.net/jdk11u-dev/compare/ab03faaa...171d73f7
> > > A few more fix-ups are needed (see also inline comments):
> > > > 3. `PlainRead.java` would need to get the `-2` added as a "good" value. Like here: [openjdk/jdk at 01875677#diff-fb4f4dbf8943e1dcfd1663922c16f9ed3db403c070bd50979680ec5303756674R48](https://github.com/openjdk/jdk/commit/01875677#diff-fb4f4dbf8943e1dcfd1663922c16f9ed3db403c070bd50979680ec5303756674R48) It's part of the original JDK-8250984 fix, but wasn't part of the 11 backport when it was done. So we should add it with this backport.
> >
> >
> > Even with this change, the test still failed.
>
> Right. See: [#840 (comment)](https://github.com/openjdk/jdk11u-dev/pull/840#issuecomment-1067065313)
Okay. It does not fix the test, I don't think we should include it in this patch, I would prefer to fix it separately.
-------------
PR: https://git.openjdk.java.net/jdk11u-dev/pull/863
More information about the jdk-updates-dev
mailing list