RFR: 8322420: [Linux] cgroup v2: Limits in parent nested control groups are not detected [v2]
Severin Gehwolf
sgehwolf at openjdk.org
Tue Aug 27 18:40:06 UTC 2024
On Tue, 27 Aug 2024 14:04:19 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
>> Severin Gehwolf has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains eight commits:
>>
>> - Merge branch 'master' into jdk-8322420_cgroup_hierarchy_walk_init
>> - Merge branch 'master' into jdk-8322420_cgroup_hierarchy_walk_init
>> - Remove some duplication
>> - Fix style
>> - Merge branch 'master' into jdk-8322420_cgroup_hierarchy_walk_init
>> - Merge branch 'master' into jdk-8322420_cgroup_hierarchy_walk_init
>> - Merge branch 'master' into jdk-8322420_cgroup_hierarchy_walk_init
>> - 8322420: [Linux] cgroup v2: Limits in parent nested control groups are not detected
>
> src/hotspot/os/linux/cgroupUtil_linux.cpp line 71:
>
>> 69: path_iterated = true;
>> 70: if (limit > 0) {
>> 71: log_trace(os, container)("Adjusted controller path for memory to: %s", mem->subsystem_path());
>
> Please trace out the found limit as well
Do we really need to mention it again? From the PR description here is how it looks like when this code runs:
[0.001s][trace][os,container] Adjusting controller path for memory: /sys/fs/cgroup/memory/user.slice/user-cg.slice/user-cg-cpu.slice/run-r634adce2617145ea9660623c335cb3db.scope
[0.001s][trace][os,container] Path to /memory.limit_in_bytes is /sys/fs/cgroup/memory/user.slice/user-cg.slice/user-cg-cpu.slice/run-r634adce2617145ea9660623c335cb3db.scope/memory.limit_in_bytes
[0.001s][trace][os,container] Memory Limit is: 9223372036854771712
[0.001s][debug][os,container] container memory limit ignored: 9223372036854771712, using host value 67163885568
[0.001s][trace][os,container] Path to /memory.limit_in_bytes is /sys/fs/cgroup/memory/user.slice/user-cg.slice/user-cg-cpu.slice/memory.limit_in_bytes
[0.001s][trace][os,container] Memory Limit is: 9223372036854771712
[0.001s][debug][os,container] container memory limit ignored: 9223372036854771712, using host value 67163885568
[0.001s][trace][os,container] Path to /memory.limit_in_bytes is /sys/fs/cgroup/memory/user.slice/user-cg.slice/memory.limit_in_bytes
[0.001s][trace][os,container] Memory Limit is: 4294967296
[0.001s][trace][os,container] Adjusted controller path for memory to: /sys/fs/cgroup/memory/user.slice/user-cg.slice
I.e. `read_memory_limit_in_bytes()` does that already. Thoughts?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20646#discussion_r1733349585
More information about the hotspot-runtime-dev
mailing list