RFR (M): 8157952: Parallelize Memory Pretouch
thomas.schatzl at oracle.com
Wed Sep 7 12:50:16 UTC 2016
On Wed, 2016-09-07 at 10:54 +0000, Vitaly Davidovich wrote:
> Hi Thomas,
> Why does the G1PretouchTask use an atomic ptr add to advance the
> touch address?
to make sure that a particular thread gets a unique page to touch.
Otherwise multiple threads might get the same. While this is not a
correctness issue, it's useless work. Also the OS will likely let all
but the first thread wait until the page has been allocated and cleared
until they can proceed. I.e. the threads will be serialized again.
More information about the hotspot-gc-dev