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

Jonathan Dowland jdowland at openjdk.org
Thu Dec 1 10:23:58 UTC 2022


> This is a backport of [4def210a22faaec6b47912dd314e6365ea48d28f](https://github.com/openjdk/jdk/commit/4def210a22faaec6b47912dd314e6365ea48d28f) for jdk8u-dev as part of an effort to backport cgroups v2 support.
> 
> It does not apply clean. Paths need unshuffling. A number of changes were needed for 8u support. I've structured the PR as separate commits, with each change made in a separate commit for (hopefully) ease of review.
> 
> Not all the new tests pass:     TestDockerMemoryMetrics  failing one, specifically:
> 
>     Exception in thread "main" java.lang.RuntimeException: Memory and swap limit not equal, expected : [209715200, 1073741824], got : [209715200, 864026624]
> 
> I think this is fixed in a further patch to backport, and will confirm.

Jonathan Dowland has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 16 commits:

 - Address style nit
 - TestCgroupSubsystemController: rework use of Files.writeString
 - CgroupSubsystemController: fix library paths
   
   We need the testlibrary copy of FileUtils but the test.lib.util copy of
   Utils (method createTempDirectory is missing from the testlib copy)
 - TestCgroupSubsystemController: fix jtreg @library path
 - Replace Arrays.compare with Arrays.equals
   
   jdk8u does not have Arrays.compare()
 - incorporate (part of) 8275713: TestDockerMemoryMetrics test fails on recent runc
   
   The main hunk from 8275713 was rolled up in the changes for 8231111.
   This line is also necessary.
 - update mapfile for new JNI method name
 - tests for the backport
   
   two files had fairly significant merge conflicts, eyeball only to resolve
   
   haven't run any of them yet -- will depend on the rest of the patch
 - CgroupSubsystemFactory: remove logging lines
   
   jdk8u doesn't have java.lang.System.Logger. There's no existing logging
   in place for other classes in the Metrics/platform/etc family that I can
   see, so remove it.
 - Metrics => CgroupV1Subsystem.java
   
   unshuffle, rename, resolve unclean hunks although I'm not sure why they
   didn't apply, they look trivial and the context is the same, will look
   closer
 - ... and 6 more: https://git.openjdk.org/jdk8u-dev/compare/7eb2803b...831ee9c1

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

Changes: https://git.openjdk.org/jdk8u-dev/pull/121/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk8u-dev&pr=121&range=07
  Stats: 5335 lines in 33 files changed: 3621 ins; 1582 del; 132 mod
  Patch: https://git.openjdk.org/jdk8u-dev/pull/121.diff
  Fetch: git fetch https://git.openjdk.org/jdk8u-dev pull/121/head:pull/121

PR: https://git.openjdk.org/jdk8u-dev/pull/121


More information about the jdk8u-dev mailing list