RFR: 8253727: [cgroups v2] Memory and swap limits reported incorrectly [v2]

Bob Vandette bobv at openjdk.java.net
Tue Sep 29 15:15:53 UTC 2020


On Tue, 29 Sep 2020 15:00:43 GMT, Severin Gehwolf <sgehwolf at openjdk.org> wrote:

>> src/hotspot/os/linux/cgroupV2Subsystem_linux.cpp line 168:
>> 
>>> 166:   char* mem_swp_limit_str = mem_swp_limit_val();
>>> 167:   jlong swap_limit = limit_from_str(mem_swp_limit_str);
>>> 168:   if (swap_limit >= 0) {
>> 
>> In the recent fix for JDK-8250984, we added support for systems that don't have swap accounting enabled.  CgroupV2
>> currently has a bug where you can't even set memory limits in this config but assuming they will fix that, we might
>> want to add that support for v2 now.  If the memory.swap.max file is not avail, then we return whatever memory limit is.
>
> Hmm, I'd prefer if we kept those two changes separate. This makes it easier to backport and makes intent more obvious.
> FWIW, I'd like to bring this to 15u. I've filed https://bugs.openjdk.java.net/browse/JDK-8253797 to track this.

Ok.

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

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


More information about the core-libs-dev mailing list