RFR: JDK-8266490: Extend the OSContainer API to support the pids controller of cgroups [v8]
Severin Gehwolf
sgehwolf at openjdk.java.net
Fri Aug 6 08:32:30 UTC 2021
On Thu, 5 Aug 2021 11:21:59 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:
>> Hello, please review this PR; it extend the OSContainer API in order to also support the pids controller of cgroups.
>>
>> I noticed that unlike the other controllers "cpu", "cpuset", "cpuacct", "memory" on some older Linux distros (SLES 12.1, RHEL 7.1) the pids controller might not be there (or not fully supported) so it was added as optional , see the coding
>>
>>
>> if (!cg_infos[PIDS_IDX]._data_complete) {
>> log_debug(os, container)("Optional cgroup v1 pids subsystem not found");
>> // keep the other controller info, pids is optional
>> }
>
> Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision:
>
> Adjust tests, unlimited pids value can lead on some setups to high number
This looks good to me now and passes tests on my cgroup v1 and cgroup v2 setups.
test/hotspot/jtreg/containers/docker/TestPids.java line 130:
> 128: opts.addDockerOpts("--pids-limit=-1");
> 129: } else {
> 130: opts.addDockerOpts("--pids-limit="+value);
Style nit: Space before and after `+`.
test/jdk/jdk/internal/platform/docker/TestPidsLimit.java line 111:
> 109: opts.addDockerOpts("--pids-limit=-1");
> 110: } else {
> 111: opts.addDockerOpts("--pids-limit="+pidsLimit);
Style nit: Space before and after `+`.
-------------
Marked as reviewed by sgehwolf (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/4518
More information about the core-libs-dev
mailing list