Integrated: 8275426: PretouchTask num_chunks calculation can overflow
Kim Barrett
kbarrett at openjdk.java.net
Thu Oct 21 13:34:08 UTC 2021
On Mon, 18 Oct 2021 17:43:58 GMT, Kim Barrett <kbarrett 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.
This pull request has now been integrated.
Changeset: 60cb27dc
Author: Kim Barrett <kbarrett at openjdk.org>
URL: https://git.openjdk.java.net/jdk/commit/60cb27dcda475a66e329359ac1ee3ffcde95c657
Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
8275426: PretouchTask num_chunks calculation can overflow
Reviewed-by: ayang, tschatzl
-------------
PR: https://git.openjdk.java.net/jdk/pull/5993
More information about the hotspot-gc-dev
mailing list