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

Jonathan Dowland jdowland at openjdk.org
Fri Nov 4 10:03:56 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 refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR. The pull request contains 16 new commits since the last revision:

 - 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/f56af77f...a2bb1693

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

Changes:
  - all: https://git.openjdk.org/jdk8u-dev/pull/121/files
  - new: https://git.openjdk.org/jdk8u-dev/pull/121/files/f56af77f..a2bb1693

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk8u-dev&pr=121&range=05
 - incr: https://webrevs.openjdk.org/?repo=jdk8u-dev&pr=121&range=04-05

  Stats: 0 lines in 0 files changed: 0 ins; 0 del; 0 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