On Wed, 20 Apr 2022 18:18:25 GMT, xpbob <d...@openjdk.java.net> wrote:
>> set memory.swappiness to 0,swap space will not be used >> determine the value of memory.swappiness >> https://www.kernel.org/doc/Documentation/cgroup-v1/memory.txt >> >> >> Memory Limit: 50.00M >> Memory Soft Limit: Unlimited >> Memory & Swap Limit: 100.00M >> Maximum Processes Limit: 4194305 >> >> => >> >> Memory Limit: 50.00M >> Memory Soft Limit: Unlimited >> Memory & Swap Limit: 50.00M >> Maximum Processes Limit: 4194305 > > xpbob has updated the pull request incrementally with one additional commit > since the last revision: > > add test and hotspot data Changes requested by sgehwolf (Reviewer). test/hotspot/jtreg/containers/docker/TestMemoryAwareness.java line 164: > 162: opts.addDockerOpts("--memory-swappiness", "0"); > 163: } else { > 164: opts.addDockerOpts("--memory-swappiness", "60"); Unfortunately this breaks on a cgroups v2 system as `--memory-swappiness` is not supported there. I'd prefer if this wouldn't piggy back on the existing test, but actually assert that swap is properly reported as the same as the memory limit if `--memory-swappiness=0`. Also, this test only verifies the Java (core-libs) change, not the hotspot change. That would have to be done via some `TestMisc` variant which uses `print_container_info()`. ------------- PR: https://git.openjdk.java.net/jdk/pull/8285