RFR: 8322420: [Linux] cgroup v2: Limits in parent nested control groups are not detected [v20]

Jan Kratochvil jkratochvil at openjdk.org
Fri Aug 16 10:47:54 UTC 2024


On Wed, 14 Aug 2024 14:56:26 GMT, Severin Gehwolf <sgehwolf at openjdk.org> wrote:

>> Jan Kratochvil has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Testcase update upon review by Severin Gehwolf
>
> test/hotspot/jtreg/containers/cgroup/NestedCgroup.java line 109:
> 
>> 107: 
>> 108:             // Alpine Linux 3.20.1 needs cgcreate1 otherwise:
>> 109:             // cgcreate: can't create cgroup [...]: No such file or directory
> 
> Suggestion:
> 
>             // Create the parent cgroup hierarchy

_"Create the parent cgroup hierarchy"_ would be commenting an obvious thing so such comment is best to rather remove. The problem my comment is trying to describe is that on normal (tested Fedora) systems it is OK to do only:

cgcreate -g memory:a/b

On Alpine Linux it does not work (I did not investigate why). On Alpine Linux one has to do:

cgcreate -g memory:a
cgcreate -g memory:a/b

Developers probably will not use Alpine Linux so they may delete the first line

cgcreate -g memory:a

as it looks redundant. But it will break Alpine Linux.

Suggestion:

            // Alpine Linux 3.20.1 needs cgcreate1 as while regular Linuxes are fine with:
            //   cgcreate -g memory:a/b
            // Alpine Linux 3.20.1 needs both commands:
            //   cgcreate -g memory:a
            //   cgcreate -g memory:a/b
            // With only the second line Alpine Linux 3.20.1 would error with:
            //   cgcreate: can't create cgroup [...]: No such file or directory

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/17198#discussion_r1719681365


More information about the core-libs-dev mailing list