On Tue, 12 Nov 2024 19:41:50 GMT, Severin Gehwolf <sgehw...@openjdk.org> wrote:
>> Sergey Chernyshev has updated the pull request with a new target base due to >> a merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains four additional >> commits since the last revision: >> >> - Merge branch 'master' into JDK-8343191 >> - patch reimplemented >> - fix the logic that skips duplicate controller's mount points >> - 8343191: Cgroup v1 subsystem fails to set subsystem path > > src/java.base/linux/classes/jdk/internal/platform/cgroupv1/CgroupV1SubsystemController.java > line 46: > >> 44: } >> 45: >> 46: public void setPath(String cgroupPath) { > > This should behave the same as Hotspot and also append the cgroup path to the > mount point. Then let > [JDK-8336881](https://bugs.openjdk.org/browse/JDK-8336881) kick in to reduce > it down to the mount point (if necessary). Correct. I double checked the behavior in cg v2: sudo cgcreate -g memory:/test sudo cgcreate -g memory:/test/test sudo cgset -r memory.max=50m test sudo cgset -r memory.swap.max=0 test sudo cgset -r memory.max=100m test/test sudo cgset -r memory.swap.max=0 test/test with the above setup, allocations smaller than the outer group size will work, bigger will be oom-killed. $ sudo cgexec -g memory:/test/test sh -c "head -c 45m /dev/zero | tail | wc -c" 47185920 $ sudo cgexec -g memory:/test/test sh -c "head -c 55m /dev/zero | tail | wc -c" 0 Killed I'll update the PR next week. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/21808#discussion_r1838979707