RFR: JDK-8256155: os::Linux Populate all large_page_sizes, select smallest page size in reserve_memory_special_huge_tlbfs* [v18]

Marcus G K Williams github.com+168222+mgkwill at openjdk.java.net
Thu Mar 11 03:40:18 UTC 2021


> 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.

Marcus G K Williams has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 28 commits:

 - Update LargePage Setup per review comments
   
   Signed-off-by: Marcus G K Williams <marcus.williams at intel.com>
 - Merge remote-tracking branch 'upstream/master' into update_hlp
 - Cast os::vm_page_size to size_t, fix build
   
   Signed-off-by: Marcus G K Williams <marcus.williams at intel.com>
 - Merge branch 'master' into pull/1153
 - kstefanj update
   
   Signed-off-by: Marcus G K Williams <marcus.williams at intel.com>
 - Merge branch 'master' into update_hlp
 - Merge branch 'master' into update_hlp
 - Remove extraneous ' from warning
   
   Signed-off-by: Marcus G K Williams <marcus.williams at intel.com>
 - Merge branch 'master' into update_hlp
 - Merge branch 'master' into update_hlp
 - ... and 18 more: https://git.openjdk.java.net/jdk/compare/57f16f9f...e0c54616

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

Changes: https://git.openjdk.java.net/jdk/pull/1153/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=1153&range=17
  Stats: 130 lines in 2 files changed: 60 ins; 46 del; 24 mod
  Patch: https://git.openjdk.java.net/jdk/pull/1153.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/1153/head:pull/1153

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



More information about the hotspot-gc-dev mailing list