JDK-8261527 : Record page size used for underlying mapping in ReservedSpace
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2021-02-10
  • Updated: 2021-05-10
  • Resolved: 2021-05-04
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 17
17 b21Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
Knowing what page size was used for a mapping can sometimes be needed. Either for logging or to figure out a suitable chunk-size when pretouching memory. Currently we have a helper function `ReservedSpace::actual_reserved_page_size()` that looks at the `ReservedSpace` and tries to figure out what page size was used. 

As long as only large page size can be used in the VM this works well. But if we enable the JVM to use more than one large page size, (see JDK-8256155) this helper will not be enough. 

A better solution would be to extend the reservation APIs to pass back the page size used for a mapping and then record this in the ReservedSpace.
Comments
Changeset: 141cc2f2 Author: Stefan Johansson <sjohanss@openjdk.org> Date: 2021-05-04 09:00:10 +0000 URL: https://git.openjdk.java.net/jdk/commit/141cc2f2a35abdce48397071e2ce7ea862cf5755
04-05-2021