RFR: 8265268: Unify ReservedSpace reservation code in initialize and try_reserve_heap [v2]
Stefan Johansson
sjohanss at openjdk.java.net
Thu Apr 22 14:01:52 UTC 2021
On Thu, 22 Apr 2021 13:44:43 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:
>> src/hotspot/share/memory/virtualspace.cpp line 217:
>>
>>> 215: // There are basically three different cases that we need to handle below:
>>> 216: // - Mapping backed by a file
>>> 217: // - Mapping backed by explicit large pages
>>
>> I think there should be a description what "explicit large pages" are. Only in the case that the OS can't commit large page memory this path is taken.
>> The third option kind of suggests that there is only "explicit large page support" if you want large pages (only talking about normal pages or THP, but on e.g. Linux you do not need to pre-commit large pages reservations.
>
> @kstefanj enlightened me about that even on Linux we pre-commit everything *but* the linux counters (particularly `free_hugepages`) is not updated until the page has been touched. That misled me to believing that we do not need to actually precommit there.
> So, ignore this comment.
Discussed this with Thomas offline and we agreed on the current text being ok after all.
-------------
PR: https://git.openjdk.java.net/jdk/pull/3570
More information about the hotspot-dev
mailing list