RFR: 8322420: [Linux] cgroup v2: Limits in parent nested control groups are not detected [v12]
Jan Kratochvil
jkratochvil at openjdk.org
Mon Jul 15 04:02:00 UTC 2024
On Thu, 11 Jul 2024 12:49:24 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 910:
>
>> 908: memory_swap_limit_min = memory_swap_limit;
>> 909: best_level = dir_count;
>> 910: }
>
> There is no point in doing memory and memory and swap. Both are controlled by the same controller. So there is no chance that the paths would differ.
The code finds the lowest level which has any limit set (=is not `max`). If both `memory.max` and `memory.swap.max` are `max` in the leaf it goes to the parent level. But I see you do not want to calculate what Linux kernel does but you rather assume descending memory limits. So from this your change this function should find only the lowest level with existing controller.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17198#discussion_r1677291679
More information about the core-libs-dev
mailing list