JDK-8256155 : Allow multiple large page sizes to be used on Linux
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux
  • Submitted: 2020-11-10
  • Updated: 2024-02-06
  • Resolved: 2021-05-21
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 b24Fixed
Related Reports
CSR :  
Relates :  
Relates :  
Relates :  
Description
When using LargePageSizeInBytes=1G, os::Linux::reserve_memory_special_huge_tlbfs* cannot select large pages smaller than 1G. Code heap usually uses less than 1G, so currently the code precludes code heap from using 
Large pages in this circumstance and when os::Linux::reserve_memory_special_huge_tlbfs* is called page sizes fall back to Linux::page_size() (usually 4k).

This change allows the above use case by populating all large_page_sizes present in /sys/kernel/mm/hugepages in _page_sizes upon calling os::Linux::setup_large_page_size().

In os::Linux::reserve_memory_special_huge_tlbfs* we then select the largest large page size available in _page_sizes that is smaller than bytes being reserved.

Comments
Changeset: 94cfeb9c Author: Marcus G K Williams <mgkwill@openjdk.org> Committer: Stefan Johansson <sjohanss@openjdk.org> Date: 2021-05-21 14:15:29 +0000 URL: https://git.openjdk.java.net/jdk/commit/94cfeb9c4fee2ba5db8e5efa6b0f2041400c8b3a
21-05-2021