RFR: 8292083: Detected container memory limit may exceed physical machine memory [v3]
Thomas Stuefe
stuefe at openjdk.org
Thu Aug 18 05:51:18 UTC 2022
On Wed, 17 Aug 2022 13:48:39 GMT, Jonathan Dowland <jdowland at openjdk.org> wrote:
>> src/hotspot/os/linux/osContainer_linux.cpp line 65:
>>
>>> 63: }
>>> 64: if ((mem_limit = cgroup_subsystem->memory_limit_in_bytes()) > 0 &&
>>> 65: mem_limit < host_memory) {
>>
>> I really would like it if these two conditions were nested, that would be easier to understand.
>>
>> if (memlimit valid and > 0) {
>> if (memlimit <= phys) {
>> phys = memlimit
>> } else {
>> log
>> }
>> }
>
> Thank you; Addressed in `7f5307d69bb` (although possibly moot, once we resolve your other review comment https://github.com/openjdk/jdk/pull/9880#discussion_r947908655).
>
> Presently, we trace log if the memory limit matches physical RAM. We could stop doing that: it doesn't seem too valuable. WDYT?
Yes, its not that important.
-------------
PR: https://git.openjdk.org/jdk/pull/9880
More information about the hotspot-runtime-dev
mailing list