[21u] Backport intention of 8322420: [Linux] cgroup v2: Limits in parent nested control groups are not detected

Jan Kratochvil jkratochvil at azul.com
Sun Apr 13 14:14:22 UTC 2025


Hi,

On Thu, 27 Mar 2025 21:26:15 +0800, Severin Gehwolf wrote:
> Looking at the schedule for the next JDK 21 updates, I'd propose to
> target this for 21.0.9 in October. The initial development starts end
> of May (in about two months). At that time PRs should be ready for
> approval.

OK, so I will submit it as 6 PRs ("a patch by Yuri Nesterenko" merged with
"8261242 OSContainer::is_containerized()").


> Looking at the initially proposed list of patches, it appears not all
> of them make sense to bring in as a dependency.

As I see you have dropped JFR support and RSS+cache info, OK.

A test backport FYI:
https://github.com/openjdk/jdk21u-dev/compare/master...jankratochvil:jdk21u-dev:devmaster-cgroup2reduced?expand=1
https://github.com/jankratochvil/jdk21u-dev/tree/devmaster-cgroup2reduced


Thanks,
Jan


/^-/ patches you dropped compared to my original mail.
Patches which have been already merged to jdk21 in the meantime have been
omitted.


-- <https://github.com/openjdk/jdk/commit/c96cbe481c86800b76e220374b24b6671984adb7>
-  <https://bugs.openjdk.org/browse/JDK-8313083> Print 'rss' and 'cache' as part of the container information
-  9 files changed, 46 insertions(+), 1 deletion(-)
-  
-- <https://github.com/openjdk/jdk/commit/cab74b075e4572529a21bf8ac652ec2f1ab4fcaf>
-  <https://bugs.openjdk.org/browse/JDK-8324287> Record total and free swap space in JFR
-  11 files changed, 178 insertions(+), 1 deletion(-)
-
-- <https://github.com/openjdk/jdk/commit/3d106cb091de6b6ef2a9bf483fb0f5c98c28263c>
-  <https://bugs.openjdk.org/browse/JDK-8325139> JFR SwapSpace event - add free swap space information on Linux when running in a container environment
-  9 files changed, 101 insertions(+), 10 deletions(-)
-
-- <https://github.com/openjdk/jdk/commit/09d4936657a0bdc122a4ab80735bd9c8c109839c>
-    <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
-  1 file changed, 5 insertions(+), 5 deletions(-)
-
 - <https://github.com/openjdk/jdk/commit/3d4eb159e6d597f37081faf21b7e3f0f1af299e5>
   <https://bugs.openjdk.org/browse/JDK-8302744> Refactor Hotspot container detection code
   10 files changed, 862 insertions(+), 590 deletions(-)
    - test/hotspot/gtest/os/linux/test_cgroupSubsystem_linux.cpp conflict due to missing JDK-8252136 Several methods in hotspot are missing "static"
 
 - <https://github.com/openjdk/jdk/commit/d0052c032cc1927e7e92f04cfedab20e0c4e0293>
   <https://bugs.openjdk.org/browse/JDK-8333326> Linux Alpine build fails after 8302744
   1 file changed, 9 insertions(+), 5 deletions(-)
 
 - <https://github.com/openjdk/jdk21u-dev/pull/1330/commits/1ceeb18e6fbf9a7851499b89cba34544ddbcd6dc>
   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 <https://bugs.openjdk.org/browse/JDK-8017234>
   1 file changed, 1 insertion(+)
 
 - <https://github.com/openjdk/jdk/commit/0a6ffa57954ddf4f92205205a5a1bada813d127a>
   <https://bugs.openjdk.org/browse/JDK-8261242> [Linux] OSContainer::is_containerized() returns true when run outside a container
   18 files changed, 290 insertions(+), 63 deletions(-)
    - test/hotspot/jtreg/ProblemList.txt change automatically dropped by GIT as not needed in JDK21
 
 - <https://github.com/openjdk/jdk/commit/153b12b9df87fdf8122cae3bf7f13078f55f7101>
   <https://bugs.openjdk.org/browse/JDK-8331560> Refactor Hotspot container detection code so that subsystem delegates to controllers
   8 files changed, 511 insertions(+), 264 deletions(-)
 
 - <https://github.com/openjdk/jdk/commit/38bd8a36704a962f0ad1052fd2ec150a61663256>
   <https://bugs.openjdk.org/browse/JDK-8338236> Compile error in cgroup code on Linux when using clang
   2 files changed, 5 insertions(+), 5 deletions(-)
 
 - <https://github.com/openjdk/jdk/commit/55a7cf14453b6cd1de91362927b2fa63cba400a1>
   <https://bugs.openjdk.org/browse/JDK-8322420> [Linux] cgroup v2: Limits in parent nested control groups are not detected
   9 files changed, 362 insertions(+), 111 deletions(-)
-
-- <https://github.com/openjdk/jdk/commit/de55db2352f84c101f8197ee7aca80d72807fbc5>
-  <https://bugs.openjdk.org/browse/JDK-8333522> JFR SwapSpace event might read wrong free swap space size
-  1 file changed, 4 insertions(+), 1 deletion(-)


More information about the jdk-updates-dev mailing list