On Wed, 27 Apr 2022 14:24:50 GMT, Severin Gehwolf <sgehw...@openjdk.org> wrote:

>> xpbob has updated the pull request incrementally with one additional commit 
>> since the last revision:
>> 
>>   revert file
>
> test/hotspot/jtreg/containers/docker/TestMisc.java line 60:
> 
>> 58:             testPrintContainerInfo();
>> 59:             testPrintContainerInfoActiveProcessorCount();
>> 60:             testPrintContainerMemoryInfo("100M", "150M");
> 
> Again. This test runs unconditionally. `--memory-swappiness` is not supported 
> in cgroups v2. Thus, the test will fail on a cgroups v2 system. You need to 
> only run this test on a cgroups v1 system. Have a look at 
> `test/lib/jdk/test/lib/containers/cgroup/MetricsTester.java` how could could 
> detect this and only run on `cgroupv1` providers.

On my cgroups v2 system (i.e. it's using 200m memory + 200m swap):

$ sudo docker run --rm -ti --memory-swappiness=0 --memory=200m fedora:35
WARNING: Your kernel does not support memory swappiness capabilities or the 
cgroup is not mounted. Memory swappiness discarded.
[root@fb3182c8e23c /]# cat /sys/fs/cgroup/memory.max 
209715200
[root@fb3182c8e23c /]# cat /sys/fs/cgroup/memory.swap.max 
209715200

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

PR: https://git.openjdk.java.net/jdk/pull/8285

Reply via email to