On Tue, 24 Jan 2023 08:48:13 GMT, Matthias Baesken <[email protected]> wrote:

>> Severin Gehwolf has updated the pull request with a new target base due to a 
>> merge or a rebase. The incremental webrev excludes the unrelated changes 
>> brought in by the merge/rebase. The pull request contains one additional 
>> commit since the last revision:
>> 
>>   8300659: Refactor TestMemoryAwareness to use WhiteBox api for host values
>
> Hi Severin, what do you think about renaming the methods  to 
> WB_HostPhysicalMemory / WB_HostPhysicalSwap  to make it even more clear that 
> the host values are meant ? On Linux we have values
> `_physical_memory = (julong)sysconf(_SC_PHYS_PAGES) * 
> (julong)sysconf(_SC_PAGESIZE);`
> and
> `julong os::physical_memory()`   from os_linux.cpp (including 
> OSContainer::memory_limit_in_bytes())  so these could be 2 different values .
> 
> And please adjust the COPYRIGHT years to 2023.

@MBaesken Thanks for the review!

> what do you think about renaming the methods to WB_HostPhysicalMemory / 
> WB_HostPhysicalSwap to make it even more clear that the host values are meant?

Sure, done.

> On Linux we have values `_physical_memory = (julong)sysconf(_SC_PHYS_PAGES) * 
> (julong)sysconf(_SC_PAGESIZE);` and `julong os::physical_memory()` from 
> os_linux.cpp (including OSContainer::memory_limit_in_bytes()) so these could 
> be 2 different values .

Yes. `os::Linux::physical_memory()` returns the host physical memory. Added 
with [JDK-8293200](https://bugs.openjdk.org/browse/JDK-8293200). 
`os::physical_memory()` returns the container memory (if run with a limit). In 
this case we want the former.

> And please adjust the COPYRIGHT years to 2023.

Done.

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

PR: https://git.openjdk.org/jdk/pull/12097

Reply via email to