[jdk11u-dev] RFR: 8231111: Cgroups v2: Rework Metrics in java.base so as to recognize unified hierarchy [v6]

Severin Gehwolf sgehwolf at openjdk.java.net
Tue Mar 15 15:07:46 UTC 2022


On Mon, 14 Mar 2022 18:11:13 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 incrementally with one additional commit since the last revision:
> 
>   Fixes

A few more fix-ups are needed (see also inline comments):

1. [JDK-8272124](https://bugs.openjdk.java.net/browse/JDK-8272124) fix and test.
2. [JDK-8223396](https://bugs.openjdk.java.net/browse/JDK-8223396). Backport those test changes as a dependency?
3. `PlainRead.java` would need to get the `-2` added as a "good" value. Like here: 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.

-------------

Changes requested by sgehwolf (Reviewer).

PR: https://git.openjdk.java.net/jdk11u-dev/pull/863


More information about the jdk-updates-dev mailing list