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

Kim Barrett kbarrett at openjdk.org
Mon Oct 9 07:53:30 UTC 2023


On Wed, 4 Oct 2023 14:01:36 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

>> src/hotspot/share/gc/shared/pretouchTask.cpp line 75:
>> 
>>> 73:   // initially always use small pages.
>>> 74:   page_size = UseTransparentHugePages ? (size_t)os::vm_page_size() : page_size;
>>> 75: #endif
>> 
>> I never liked this, so happy to see it gone.
>
> It was also the wrong place for this fix since it left out naked calls to os::pretouch_memory.

ZGC, and I think Shenandoah, have special handling of UseTransparentHugePages, arranging to similarly
call os::pretouch_memory with small page sizes when that option is true.  It might be that this change
enables some further simplifications (that should perhaps be done as followups rather than added to this).

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

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


More information about the hotspot-runtime-dev mailing list