RFR: 8275426: PretouchTask num_chunks calculation can overflow
Kim Barrett
kbarrett at openjdk.java.net
Mon Oct 18 17:53:05 UTC 2021
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.
-------------
Commit messages:
- change num_chunks calculation
Changes: https://git.openjdk.java.net/jdk/pull/5993/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5993&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8275426
Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
Patch: https://git.openjdk.java.net/jdk/pull/5993.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/5993/head:pull/5993
PR: https://git.openjdk.java.net/jdk/pull/5993
More information about the hotspot-gc-dev
mailing list