RFR: 8322420: [Linux] cgroup v2: Limits in parent nested control groups are not detected [v2]
Severin Gehwolf
sgehwolf at openjdk.org
Tue Aug 27 19:13:03 UTC 2024
On Tue, 27 Aug 2024 14:23:18 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.hpp line 40:
>
>> 38: // Iterate over the cpu controller hierarchy adjusting the path to the
>> 39: // smallest observable limit (if any)
>> 40: static CgroupCpuController* adjust_controller(CgroupCpuController* c);
>
> We never return a new controller, but always the old one. I think I would simplify and clarify the API and return void. I would not allow for API chaining here, the memory ownerships are difficult enough to follow as it is. Could also return boolean for success=limit found. And comment should make it clear we operate on the given controller.
>
> Proposal:
>
>
> Given a memory controller, adjust its path to a point in the hierarchy
> that represents the closest memory limit. Returns true if such limit was
> found, false if not.
OK. I've changed the API to return `void` and fixed the comment.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20646#discussion_r1733393120
More information about the hotspot-runtime-dev
mailing list