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

Stefan Johansson sjohanss at openjdk.java.net
Tue Apr 20 14:11:28 UTC 2021


On Fri, 2 Apr 2021 16:38:02 GMT, Marcus G K Williams <github.com+168222+mgkwill at openjdk.org> wrote:

>> 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 44 commits:
> 
>  - Merge branch 'master' into update_hlp
>  - Rebase on pull/3073
>    
>    Signed-off-by: Marcus G K Williams <marcus.williams at intel.com>
>  - Merge branch 'pull/3073' into update_hlp
>  - Thomas review.
>    
>    Changed commit_memory_special to return bool to signal if the request succeeded or not.
>  - Self review.
>    
>    Update helper name to better match commit_memory_special().
>  - Marcus review.
>    
>    Updated comments.
>  - Ivan review
>    
>    Renamed helper to commit_memory_special and updated the comments.
>  - 8262291: Refactor reserve_memory_special_huge_tlbfs
>  - Merge branch 'master' into update_hlp
>  - Addressed kstefanj review suggestions
>    
>    Signed-off-by: Marcus G K Williams <marcus.williams at intel.com>
>  - ... and 34 more: https://git.openjdk.java.net/jdk/compare/f60e81bf...f5bfe224

Just created a CSR for this: [JDK-8265517](https://bugs.openjdk.java.net/browse/JDK-8265517)
Please take a look at it and provide feedback if you have any. 

@mgkwill, please update the patch with the text from the CSR for `LargePageSizeInBytes`.

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

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



More information about the hotspot-gc-dev mailing list