RFR: 8257901: ZGC: Take virtual memory usage into account when sizing heap [v2]

Per Liden pliden at openjdk.java.net
Wed Dec 9 09:41:50 UTC 2020


On Wed, 9 Dec 2020 07:56:50 GMT, Stefan Karlsson <stefank at openjdk.org> wrote:

>> Per Liden has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Review StefanK
>
> The functionality seems fine. However, the naming of things are very misleading. Arguments::limit_by_allocatable_memory has no indication that this can only be used to limit the heap memory. The non-ZGC GCs use MaxVirtMemFraction, which doesn't sound like something that has to do with the heap size. But, if you read the description of that flag it's apparent that it's about the max heap size. The added ZGC implementation also highly depend on the fact that max_virtual_memory_fraction() means the "max fraction of virtual memory that can be used by the heap". I think it would be good to name max_virtual_memory_fraction to something that indicates this. Maybe max_heap_to_virtual_memory_fraction() (maybe there's a more succinct name, that still covers what it does?) And limit_by_allocatable_memory should also be changed, before anyone starts to use it as generic function that can be used by the rest of the JVM.
> 
> If you agree maybe update the names in this PR, or create a separate RFE?

@stefank Pushed an update to adjust the names. Also fixed copyrights.

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

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


More information about the hotspot-dev mailing list