[jdk21u-dev] RFR: 8322420: [Linux] cgroup v2: Limits in parent nested control groups are not detected
Jan Kratochvil
jkratochvil at openjdk.org
Thu Jan 16 12:33:22 UTC 2025
The goal is to backport: [8322420](https://bugs.openjdk.org/browse/JDK-8322420): [Linux] cgroup v2: Limits in parent nested control groups are not detected
There are included some pre-/post-requisite patches.
In a chronological order (the reverse of `git log`):
- [c96cbe481c86800b76e220374b24b6671984adb7](https://github.com/openjdk/jdk/commit/c96cbe481c86800b76e220374b24b6671984adb7)
[8313083](https://bugs.openjdk.org/browse/JDK-8313083) Print 'rss' and 'cache' as part of the container information
- [cab74b075e4572529a21bf8ac652ec2f1ab4fcaf](https://github.com/openjdk/jdk/commit/cab74b075e4572529a21bf8ac652ec2f1ab4fcaf)
[8324287](https://bugs.openjdk.org/browse/JDK-8324287) Record total and free swap space in JFR
patch reduced only to files:
- src/hotspot/os/linux/os_linux.cpp
- src/hotspot/share/runtime/os.hpp
- [3d106cb091de6b6ef2a9bf483fb0f5c98c28263c](https://github.com/openjdk/jdk/commit/3d106cb091de6b6ef2a9bf483fb0f5c98c28263c)
[8325139](https://bugs.openjdk.org/browse/JDK-8325139) JFR SwapSpace event - add free swap space information on Linux when running in a container environment
- [c1281e6b45ed167df69d29a6039d81854c145ae6](https://github.com/openjdk/jdk/commit/c1281e6b45ed167df69d29a6039d81854c145ae6)
[8324678](https://bugs.openjdk.org/browse/JDK-8324678) Replace NULL with nullptr in HotSpot gtests
patch reduced only to files:
- test/hotspot/gtest/runtime/test_os_linux_cgroups.cpp
- [09d4936657a0bdc122a4ab80735bd9c8c109839c](https://github.com/openjdk/jdk/commit/09d4936657a0bdc122a4ab80735bd9c8c109839c)
[8252136](https://bugs.openjdk.org/browse/JDK-8252136) Several methods in hotspot are missing "static"
patch reduced only to files:
- test/hotspot/gtest/os/linux/test_cgroupSubsystem_linux.cpp
- [e889b460c03b3887ec5477fa734c430d3c3a41c8](https://github.com/openjdk/jdk/commit/e889b460c03b3887ec5477fa734c430d3c3a41c8)
[8327071](https://bugs.openjdk.org/browse/JDK-8327071) [Testbug] g-tests for cgroup leave files in /tmp on linux
- [3d4eb159e6d597f37081faf21b7e3f0f1af299e5](https://github.com/openjdk/jdk/commit/3d4eb159e6d597f37081faf21b7e3f0f1af299e5)
[8302744](https://bugs.openjdk.org/browse/JDK-8302744) Refactor Hotspot container detection code
- [d0052c032cc1927e7e92f04cfedab20e0c4e0293](https://github.com/openjdk/jdk/commit/d0052c032cc1927e7e92f04cfedab20e0c4e0293)
[8333326](https://bugs.openjdk.org/browse/JDK-8333326) Linux Alpine build fails after 8302744
- [0a6ffa57954ddf4f92205205a5a1bada813d127a](https://github.com/openjdk/jdk/commit/0a6ffa57954ddf4f92205205a5a1bada813d127a)
[8261242](https://bugs.openjdk.org/browse/JDK-8261242) [Linux] OSContainer::is_containerized() returns true when run outside a container
- [153b12b9df87fdf8122cae3bf7f13078f55f7101](https://github.com/openjdk/jdk/commit/153b12b9df87fdf8122cae3bf7f13078f55f7101)
[8331560](https://bugs.openjdk.org/browse/JDK-8331560) Refactor Hotspot container detection code so that subsystem delegates to controllers
- [38bd8a36704a962f0ad1052fd2ec150a61663256](https://github.com/openjdk/jdk/commit/38bd8a36704a962f0ad1052fd2ec150a61663256)
[8338236](https://bugs.openjdk.org/browse/JDK-8338236) Compile error in cgroup code on Linux when using clang
- [55a7cf14453b6cd1de91362927b2fa63cba400a1](https://github.com/openjdk/jdk/commit/55a7cf14453b6cd1de91362927b2fa63cba400a1)
[8322420](https://bugs.openjdk.org/browse/JDK-8322420) [Linux] cgroup v2: Limits in parent nested control groups are not detected
- [12d060a255b9b783488714c6c2cb73a899d3f708](https://github.com/openjdk/jdk/commit/12d060a255b9b783488714c6c2cb73a899d3f708)
[8339148](https://bugs.openjdk.org/browse/JDK-8339148) Make os::Linux::active_processor_count() public
unclean but obvious
- [de55db2352f84c101f8197ee7aca80d72807fbc5](https://github.com/openjdk/jdk/commit/de55db2352f84c101f8197ee7aca80d72807fbc5)
[8333522](https://bugs.openjdk.org/browse/JDK-8333522) JFR SwapSpace event might read wrong free swap space size
- src/java.base/linux/native/libjava/CgroupMetrics.c:42:(.text+0x11): undefined reference to `JVM_IsContainerized'
a patch by Yuri Nesterenko, it is not needed in recent JDKs due to [8017234](https://bugs.openjdk.org/browse/JDK-8017234)
-------------
Commit messages:
- src/java.base/linux/native/libjava/CgroupMetrics.c:42:(.text+0x11): undefined reference to `JVM_IsContainerized'
- 8333522: JFR SwapSpace event might read wrong free swap space size
- 8339148: Make os::Linux::active_processor_count() public
- 8322420: [Linux] cgroup v2: Limits in parent nested control groups are not detected
- 8338236: Compile error in cgroup code on Linux when using clang
- 8331560: Refactor Hotspot container detection code so that subsystem delegates to controllers
- 8261242: [Linux] OSContainer::is_containerized() returns true when run outside a container
- 8333326: Linux Alpine build fails after 8302744
- 8302744: Refactor Hotspot container detection code
- 8327071: [Testbug] g-tests for cgroup leave files in /tmp on linux
- ... and 5 more: https://git.openjdk.org/jdk21u-dev/compare/40687543...1ceeb18e
Changes: https://git.openjdk.org/jdk21u-dev/pull/1330/files
Webrev: https://webrevs.openjdk.org/?repo=jdk21u-dev&pr=1330&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8322420
Stats: 2663 lines in 31 files changed: 1785 ins; 606 del; 272 mod
Patch: https://git.openjdk.org/jdk21u-dev/pull/1330.diff
Fetch: git fetch https://git.openjdk.org/jdk21u-dev.git pull/1330/head:pull/1330
PR: https://git.openjdk.org/jdk21u-dev/pull/1330
More information about the jdk-updates-dev
mailing list