JDK-8271195 : Use largest available large page size smaller than LargePageSizeInBytes when available
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 18
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux
  • CPU: x86_64
  • Submitted: 2021-07-23
  • Updated: 2022-03-17
  • Resolved: 2022-03-16
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 19
19 b14Fixed
Related Reports
Relates :  
Relates :  
Description
It is seen that if user specified explicit  large page size is not honoured then heap is allocated from 4K pages.

In the following case:

Required Heap size : 2GB
Explicit 1GB large page reserved in hugetlbfs : 0
Explicit 2MB large page reserved in hugetlbfs : 4096 (8GB)

Since there are no explicit 1G lager pages available so heap is allocated from 4K pages even though 2M pages can accomodate the requested heap size. May be an approach chosen for code pages (JDK-8256155) which falls back to next available size could be used here.

Comments
Changeset: 08cadb47 Author: Swati Sharma <swati.sharma@intel.com> Committer: Jatin Bhateja <jbhateja@openjdk.org> Date: 2022-03-16 09:48:09 +0000 URL: https://git.openjdk.java.net/jdk/commit/08cadb4754da0d5e68ee2df45f4098d203d14115
16-03-2022

A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk/pull/7326 Date: 2022-02-02 15:58:53 +0000
02-02-2022

Maybe only with hugetlbfs?
23-07-2021

I am changing this to enhancement because this seems new functionality (which has been planned anyway), at least case A. Case B should be reported in an extra CR (this time a bug?), probably with low impact as it is not clear why aligning 4k pages to 2m would cause fragmentation.
23-07-2021