RFR (M): 8157952: Parallelize Memory Pretouch

Jon Masamitsu jon.masamitsu at oracle.com
Wed Sep 7 21:37:06 UTC 2016



Could we change G1PreTouchChunkSize to PreTouchChunkSize? It
seems like something we would want to do for other GC's at some


64 _gc_id(Universe::is_fully_initialized() ? GCId::current_raw() : 0)

What prompted the above change?


I don't think there is anything G1 specific about class G1PretouchTask.  
Could it
be renamed PretouchTask and put into its own file for easier reuse?  If you
think that is premature, ignore this comment.

Pretouch() allows for the case where the work is done by the
current thread (only 1 chunk or null pretouch_gang).

259 void G1PageBasedVirtualSpace::pretouch(size_t start_page, size_t 
size_in_pages, WorkGang* pretouch_gang) {

Pretouching is so slow that I would not think it made a difference if 
parallel worker were
used instead of the current thread.  Simpler to just always require a 
gang and
use 1 worker in the degenerate case?

Rest looks good.


On 9/7/16 1:08 AM, Thomas Schatzl wrote:
> Hi all,
>    can I have reviews for this change that parallelizes memory pretouch?
> Particularly on large systems (like hundreds of GB) this often improves
> startup time by an order of magnitude.
> Like in some systems with 1TB+ heap I have running from 12mins to
> ~1min.
> It does so by having multiple threads doing the pretouching, using more
> of the available memory bandwidth of the computer.
> This change only has an FC extension approval by the group lead for
> now, but I expect to get the release teams' approval soon.
> CR:
> https://bugs.openjdk.java.net/browse/JDK-8157952
> Webrev:
> http://cr.openjdk.java.net/~tschatzl/8157952/webrev
> Testing:
> jprt, vm.gc run with -XX:+AlwaysPreTouch, nightly test suite run
> Thanks,
>    Thomas

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/hotspot-gc-dev/attachments/20160907/90bf49bf/attachment.htm>

More information about the hotspot-gc-dev mailing list