RFR: 8315923: pretouch_memory by atomic-add-0 fragments huge pages unexpectedly [v7]

Thomas Stuefe stuefe at openjdk.org
Tue Oct 24 13:27:42 UTC 2023


On Fri, 20 Oct 2023 06:04:53 GMT, Liming Liu <duke at openjdk.org> wrote:

>> src/hotspot/share/runtime/os.cpp line 2108:
>> 
>>> 2106:     // granularity, so we can touch anywhere in a page.  Touch at the
>>> 2107:     // beginning of each page to simplify iteration.
>>> 2108:     void* first = align_down(start, page_size);
>> 
>> minor nit, since you are touching this, could you make it const too? (void* const)
>
> Touch needs a write anyway, and all related functions also do not use const here. So I would not add const for it.

I was talking about void* const, not const void*. But nevermind, its not important.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/15781#discussion_r1370151316


More information about the hotspot-runtime-dev mailing list