RFR: 8322420: [Linux] cgroup v2: Limits in parent nested control groups are not detected [v7]

Jan Kratochvil jkratochvil at openjdk.org
Sun Mar 10 14:40:09 UTC 2024


On Tue, 20 Feb 2024 15:15:09 GMT, Jan Kratochvil <jkratochvil at openjdk.org> wrote:

>> The testcase requires root permissions.
>> 
>> Designed by  Severin Gehwolf, implemented by Jan Kratochvil.
>
> Jan Kratochvil has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 23 commits:
> 
>  - Disable cgroup.subtree_control testcase on cgroup1
>  - Extend the testcase
>  - Implement cgroup.subtree_control .
>  - Remove dir_ix; only the trivial cases.
>  - Use *.effective kernel hints also in *.java
>  - Update for the kernel update *.effective
>  - Update for the kernel patch update hierarchical_memsw_limit->hierarchical_swap_limit
>  - Merge branch 'master' into master-cgroup
>  - Merge branch 'master' into master-cgroup
>  - Fail reading memory.stat only once
>  - ... and 13 more: https://git.openjdk.org/jdk/compare/2546afe2...4d3b3aa9

After internal discussion I have realized the patch has overgrown its intended scope. And one should also consider how easy it would be for a backport down to JDK-8. I am going to split it into:
1. cgroup1 bugfix to always use kernel-side computed minimum `leaf/memory.stat` even if `leaf/memory.max` is not `max` - present in the current patch - to be split out under a new JDK Bug ID
2. cgroup1 change from reading `leaf/memory.stat` to traversal of `all-depths/memory.max`. - not present in the current patch, you have requested it, its only advantage is it does not reset some of the stats. Is it really needed? Also because cgroup1 is becoming outdated, RHEL7 ends this summer.
3. cgroup2 bugfix to implement traversal of `all-depths/memory.max` - present in the current patch - to be tracked under this JDK Bug ID.
4. cgroup2 kernel-side computed minimum in `leaf/memory.max.effective` - present in the current patch but not planned to but checked into OpenJDK before the kernel patch gets accepted.

Do you agree?

I have tried a backport to JDK-8 and it looks backportable.
[jdk8-cgroup.patch.txt](https://github.com/openjdk/jdk/files/14550104/jdk8-cgroup.patch.txt)

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

PR Comment: https://git.openjdk.org/jdk/pull/17198#issuecomment-1956455248
PR Comment: https://git.openjdk.org/jdk/pull/17198#issuecomment-1987205880


More information about the core-libs-dev mailing list