[jdk11u-dev] RFR: 8230305: Cgroups v2: Container awareness

Severin Gehwolf sgehwolf at openjdk.java.net
Fri Mar 4 17:40:10 UTC 2022


On Thu, 24 Feb 2022 21:18:12 GMT, Zhengyu Gu <zgu at openjdk.org> wrote:

> I would like backport cgroups v2  support to openjdk11u.
> 
> The original patch does not apply cleanly, conflicts are resolved manually.
> 
> Test:
>   - [x] jtreg containers/docker test on Ubuntu 20.04.4 LTS

This seems fine. A few minor comments.

Aside: We need to devise a plan how we want to deal with integrating this set of patches. For example I'm seeing test failures of the hotspot container tests on a cgroups v2 system due to https://bugs.openjdk.java.net/browse/JDK-8253714.

src/hotspot/os/linux/cgroupSubsystem_linux.hpp line 54:

> 52:  * [3] https://github.com/apache/mesos/blob/3478e344fb77d931f6122980c6e94cd3913c441d/src/docker/docker.cpp#L648
> 53:  *     https://github.com/apache/mesos/blob/3478e344fb77d931f6122980c6e94cd3913c441d/src/slave/containerizer/mesos/isolators/cgroups/constants.hpp#L30
> 54:  */

This is essentially a backport of https://bugs.openjdk.java.net/browse/JDK-8216366. Perhaps add this issue as part of the backport (`/isssue add JDK-8216366`).

src/hotspot/os/linux/osContainer_linux.hpp line 71:

> 69: 
> 70: inline bool OSContainer::is_containerized() {
> 71:   assert(_is_initialized, "OSContainer not initialized");

This is essentially a backport of https://bugs.openjdk.java.net/browse/JDK-8229202 please mention that issue in the backport (`/issue add JDK-8229202`). Not sure if this will work for a backport.

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

Marked as reviewed by sgehwolf (Reviewer).

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


More information about the jdk-updates-dev mailing list