RFR: 8343191: Cgroup v1 subsystem fails to set subsystem path [v3]
Sergey Chernyshev
schernyshev at openjdk.org
Fri Nov 22 13:03:17 UTC 2024
On Fri, 22 Nov 2024 10:54:34 GMT, Severin Gehwolf <sgehwolf at openjdk.org> wrote:
> Good spot! How about this to fix it?
>
> ```
> jlong limit = mem->read_memory_limit_in_bytes(phys_mem);
> jlong lowest_limit = limit < 0 ? phys_mem: limit;
> ```
Make sense to me.
> I'm worried about the added complexity. 1.) Is this something that's needed in cg v2 too? If no, we are changing cg version agnostic code for a version specific issue. 2.) Wouldn't setting the cgroup path to `<mount_point>/<cgroup_path>` achieve the same thing, when it's currently `null` (in current master)?
The added complexity only kicks in in cg v1 when `_root != cgroup_path`, so exactly in that corner case. In cg v2 it only works with `--cgroupns=host`, it ends up calling stat() once and then continues normally, so the added overhead is minimal.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21808#discussion_r1853881528
More information about the core-libs-dev
mailing list