RFR: 8254972: Fix pretouch chunk calculations
Stefan Johansson
sjohanss at openjdk.java.net
Thu Oct 29 11:06:49 UTC 2020
On Tue, 27 Oct 2020 15:49:30 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:
> Hi all,
>
> can I have reviews for this follow-up to JDK-8252221 where Kim noticed that the code in the pretouch task has some minor issues?
>
> In particular, some code could be simplified and due to some inconsistencies, and used less than ideal number of workers. There is also a fix to avoid an overflow if you want to pretouch >= 16TB of heap with 4k pages (order of casts in calculation of ``num_workers``).
>
> Testing: tier1
>
> Thanks,
> Thomas
Looks good, maybe just add an extra assert.
src/hotspot/share/gc/shared/pretouchTask.cpp line 37:
> 35: _end_addr(end_address),
> 36: _page_size(page_size),
> 37: _chunk_size(chunk_size) { }
Add an assert here that chunk_size must be larger than or equal to page_size.
-------------
Marked as reviewed by sjohanss (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/884
More information about the hotspot-gc-dev
mailing list