RFR: 8343191: Cgroup v1 subsystem fails to set subsystem path [v3]
Severin Gehwolf
sgehwolf at openjdk.org
Mon Nov 25 09:42:17 UTC 2024
On Sat, 23 Nov 2024 10:28:42 GMT, Sergey Chernyshev <schernyshev at openjdk.org> wrote:
>>> The added code in `CgroupUtil::adjust_controller` runs for cg v1 and cg v2 when path adjustment is deemed needed. So I'm not clear why it's needed for cg v2
>>
>> It looks like there's no way to see at this point, if we are in cgroup v1 or v2 - if I am not mistaken.
>>
>>> I thought we have established that for cg v2 && `--cgroupns=host` the current path adjustment is sufficient? What am I missing?
>>
>> The current path adjustment still needs correction of `lowest_limit` in cg v2. Also allocating `limit_cg_path` is important, that's why I added the if block.
>
>> It looks like there's no way to see at this point, if we are in cgroup v1 or v2 - if I am not mistaken.
>
> On the other hand, a type parameter can be added to `CgroupUtil::adjust_controller()`. Would you recommend doing so?
@sercher I wouldn't recommend adding a type parameter. `CgroupUtil::adjust_controller` should stay cgroup version agnostic. Version specific code can be had in `set_subsystem_path()` of the corresponding impl (like an earlier version of your patch). `lowest_limit` and `limit_cg_path` fixes are version agnostic and can and should be fixed in `CgroupUtil::adjust_controller`.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21808#discussion_r1856241432
More information about the core-libs-dev
mailing list