RFR: 8322420: [Linux] cgroup v2: Limits in parent nested control groups are not detected [v12]
Jan Kratochvil
jkratochvil at openjdk.org
Mon Jul 15 03:54:00 UTC 2024
On Thu, 11 Jul 2024 12:47:38 GMT, Severin Gehwolf <sgehwolf at openjdk.org> wrote:
>> Jan Kratochvil has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 103 commits:
>>
>> - Fix the gtest
>> - fix compilation warning
>> - fix the gtest
>> - less refactorizations
>> - remove not a real backward compat.
>> - whitespace
>> - less refactorizations
>> - reduce refactorizations
>> - Fix caching
>> - Merge branch 'master' into master-cgroup
>> - ... and 93 more: https://git.openjdk.org/jdk/compare/537d20af...060e7688
>
> src/hotspot/os/linux/cgroupSubsystem_linux.cpp line 836:
>
>> 834:
>> 835: void CgroupController::set_path(const char *cgroup_path) {
>> 836: __attribute__((unused)) bool _cgroup_path; // Do not use the member variable.
>
> This seems an unusual pattern for Hotspot.
So what is a better solution? `#define`? `__attribute__((unused))` is used in `src/hotspot/os_cpu/linux_riscv/atomic_linux_riscv.hpp` (although in a different way).
> test/hotspot/jtreg/containers/cgroup/NestedCgroup.java line 1:
>
>> 1: /*
>
> I think a more generic solution would be to use https://bugs.openjdk.org/browse/JDK-8333446 for testing (requires only systemd vs. this requiring libcg). A hierarchy setup of two limits should be possible with it too, though I'm doubtful that's needed.
This was already discussed before there are fortunately still systems not plagued by `systemd`, OpenJDK on these systems is commercially supported so the testsuite should work there to prevent regressions. Otherwise false testsuite failures like [JDK-8335882](https://bugs.openjdk.org/browse/JDK-8335882) and possible future real regressions can happen on Alpine Linux. In fact there is no fix of [JDK-8335882](https://bugs.openjdk.org/browse/JDK-8335882) - the test is now just skipped. Alpine Linux has `libcgroup-dev-3.1.0-r0` and there is no `systemd`.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17198#discussion_r1677289440
PR Review Comment: https://git.openjdk.org/jdk/pull/17198#discussion_r1677288589
More information about the core-libs-dev
mailing list