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

Marcus G K Williams github.com+168222+mgkwill at openjdk.java.net
Mon Mar 15 15:45:14 UTC 2021


On Sat, 13 Mar 2021 07:34:26 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

> Hi Markus,
> 
> first off, starting to look better and better.
> 
> About the assert, I'm quite sure this is the result of using `os::page_size_for_region_aligned()` - as Stefan mentioned above you should use the unaligned version of this function since the input size 21098496 is not aligned to 2M, which causes the function to return 4K even though we have space enough to fit 9-10 2M pages here:
> 
> ```
> [0.825s][info][pagesize] Large page size returned from os::page_size_for_region_aligned: 4096, for bytes: 21098496
> ```
> 
> Sorry, I don't have time to dive deeper. I know @kstefanj had some more ideas and this ties in with his work, but he may be occupied with other things right now and may not be quick to reply.
> 
> All in all this starts to look real good. I try to resist the urge to refactor everything on the back of this PR. There will be work left for future RFEs.
> 
> Cheers, Thomas

Thanks @tstuefe Thomas.

Changed to os::page_size_for_region_unaligned at os::Linux::reserve_memory_special_huge_tlbfs_mixed. This helped. Working on new patch now.

I'd really like to resist too much refactoring here also. I believe @kstefanj is looking at more in depth refactor.

Thanks,
Marcus

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

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



More information about the hotspot-gc-dev mailing list