RFR: 8262291: Refactor reserve_memory_special_huge_tlbfs [v2]

Stefan Johansson sjohanss at openjdk.java.net
Wed Mar 24 20:29:13 UTC 2021


On Wed, 24 Mar 2021 16:55:35 GMT, Marcus G K Williams <github.com+168222+mgkwill at openjdk.org> wrote:

>> Stefan Johansson has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Ivan review
>>   
>>   Renamed helper to commit_memory_special and updated the comments.
>
> src/hotspot/os/linux/os_linux.cpp line 3987:
> 
>> 3985:   }
>> 3986: 
>> 3987:   // Start of by committing large pages.
> 
> Small Typo `  // Start of` should be `  // Start off` or `  // Start by`

Good catch, change this to `// First commit using large pages.` since I've already used "start off" above.

> src/hotspot/os/linux/os_linux.cpp line 4003:
> 
>> 4001:     // Failed to commit large pages, so we need to unmap the
>> 4002:     // reminder of the orinal reservation.
>> 4003:     ::munmap(small_start, small_size);
> 
> I'm assuming that if mmap fails for large pages, it un-maps the reservation area requested for large pages and thus here we only need to munmap for remaining reservation (small pages)?

Yes, if `mmap()` fails we lose the reservation for that range and need to start over only using small pages.

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

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


More information about the hotspot-dev mailing list