RFR: 8275426: PretouchTask num_chunks calculation can overflow
Kim Barrett
kbarrett at openjdk.java.net
Thu Oct 21 13:34:07 UTC 2021
On Mon, 18 Oct 2021 19:27:46 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:
>> Please review this change to part of the calculation of the number of
>> threads to apply to a PretouchTask when using a gang of worker threads.
>>
>> The previous calculation of the number of chunks in the range to be touched
>> can overflow in the numerator. (This may only be a realistic problem on
>> 32bit platforms. On 64bit platforms the value constraint on the chunk size
>> and plausible or architectural limits on the size of the range probably
>> prevent such overflow from occurring.)
>>
>> Testing:
>> mach5 tier1
>> Locally (linux-x64) ran with logging of the pretouch parameters enabled,
>> with various chunk sizes configured, and hand-checked the logged values.
>
> Marked as reviewed by ayang (Reviewer).
Thanks @albertnetymk and @tschatzl for reviews.
-------------
PR: https://git.openjdk.java.net/jdk/pull/5993
More information about the hotspot-gc-dev
mailing list