jdk
jdk copied to clipboard
8324649: Shenandoah: replace implementation of free set
Several objectives:
- Reduce humongous allocation failures by segregating regular regions from humongous regions
- Do not retire regions just because an allocation failed within the region if the memory remaining within the region is large enough to represent a LAB
- Track range of empty regions in addition to range of available regions in order to expedite humongous allocations
- Treat collector reserves as available for Mutator allocations after evacuation completes
- Improve encapsulation so as to enable an OldCollector reserve for future integration of generational Shenandoah
We have compared performance of existing FreeSet implementation with the proposed PR over a broad set of performance workloads and see that the impact is mostly neutral.
Comparing 105235.0 metrics from control, 220638.0 from experiment. Compare: 0.589s Most impacted benchmarks | Most impacted metrics
Shenandoah/jython | cwr_total
Only in experiment | Only in control
crypto.signverify/trigger_failure | crypto.rsa/cmr_thread_roots
extremem-large-31g/adjust_pointers | scimark.sparse.small/concurrent_thread_roots
extremem-large-31g/calculate_addresses | xml.transform/concurrent_thread_roots
crypto.signverify/class_unloading_rendezvous | mpegaudio/concurrent_weak_roots
serial/cmr_total | crypto.rsa/ctr_thread_roots
Shenandoah
+5.64% jython/cwr_total p=0.00037 Control: 1.928ms (+/-272.40us) 170 Test: 2.037ms (+/-322.73us) 344
Progress
- [x] Change must be properly reviewed (1 review required, with at least 1 Reviewer)
- [x] Change must not contain extraneous whitespace
- [x] Commit message must refer to an issue
Issue
- JDK-8324649: Shenandoah: replace implementation of free set (Bug - P4)
Reviewers
- William Kemper (@earthling-amzn - Committer) ⚠️ Review applies to 4b1d6a32
- Y. Srinivas Ramakrishna (@ysramakrishna - Reviewer) ⚠️ Review applies to b2ba4cf2
Reviewing
Using git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/17561/head:pull/17561
$ git checkout pull/17561
Update a local copy of the PR:
$ git checkout pull/17561
$ git pull https://git.openjdk.org/jdk.git pull/17561/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 17561
View PR using the GUI difftool:
$ git pr show -t 17561
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/17561.diff
Webrev
:wave: Welcome back kdnilsen! A progress list of the required criteria for merging this PR into master
will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.
@kdnilsen The following labels will be automatically applied to this pull request:
-
hotspot-gc
-
shenandoah
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing lists. If you would like to change these labels, use the /label pull request command.
Webrevs
- 62: Full - Incremental (32191190)
- 61: Full - Incremental (93761ed9)
- 60: Full - Incremental (fe76f493)
- 59: Full - Incremental (3ed62eb7)
- 58: Full - Incremental (572aa2b3)
- 57: Full - Incremental (ced947f4)
- 56: Full - Incremental (bb2a5ac1)
- 55: Full - Incremental (0bc2f9dc)
- 54: Full - Incremental (0fe4392d)
- 53: Full (be3a76de)
- 52: Full (d6e3546c)
- 51: Full - Incremental (8f5ea038)
- 50: Full - Incremental (d4c90720)
- 49: Full - Incremental (2a83e0aa)
- 48: Full - Incremental (5c973232)
- 47: Full - Incremental (06909bad)
- 46: Full - Incremental (3bf3df2d)
- 45: Full - Incremental (b69a4bf7)
- 44: Full - Incremental (24ccf880)
- 43: Full - Incremental (8c2d8015)
- 42: Full - Incremental (4b1d6a32)
- 41: Full - Incremental (43e851d3)
- 40: Full - Incremental (0cdd7745)
- 39: Full - Incremental (b64739ad)
- 38: Full - Incremental (84c5875d)
- 37: Full (7bc418fa)
- 36: Full - Incremental (04d76e8b)
- 35: Full - Incremental (b320a3a7)
- 34: Full - Incremental (38faeeab)
- 33: Full - Incremental (d65c2ea4)
- 32: Full - Incremental (eebb78a2)
- 31: Full - Incremental (57d2e71f)
- 30: Full - Incremental (9cdb82e5)
- 29: Full - Incremental (baaca573)
- 28: Full - Incremental (6d71c324)
- 27: Full - Incremental (4c829475)
- 26: Full - Incremental (9b503079)
- 25: Full - Incremental (a0b66359)
- 24: Full - Incremental (f9d61f23)
- 23: Full - Incremental (db7506e2)
- 22: Full - Incremental (4c1cf6a7)
- 21: Full - Incremental (12327c0f)
- 20: Full - Incremental (d9359a38)
- 19: Full - Incremental (9be1a16a)
- 18: Full - Incremental (2b9a4707)
- 17: Full - Incremental (25263849)
- 16: Full - Incremental (a45f976d)
- 15: Full - Incremental (42af76b4)
- 14: Full - Incremental (c2f95567)
- 13: Full (1aa5a3e6)
- 12: Full - Incremental (3ec905e8)
- 11: Full - Incremental (daacbaab)
- 10: Full - Incremental (655e30f6)
- 09: Full - Incremental (b2ba4cf2)
- 08: Full - Incremental (7d5c1fc6)
- 07: Full - Incremental (07fe812a)
- 06: Full - Incremental (5e27a585)
- 05: Full - Incremental (fb1f5bfe)
- 04: Full - Incremental (7816f3a5)
- 03: Full - Incremental (813ba6ef)
- 02: Full - Incremental (90295ae3)
- 01: Full - Incremental (5bb309a4)
- 00: Full (bc3b7a9f)
I've been trying to understand the reported trigger failure regression on hyperalloc. I cannot reproduce that result. The host on which I'm experimenting apparently has more cores than what runs the pipeline, so I have to push hyperalloc to higher allocation rates and higher memory utilization in order to see any "trigger failures at all". On my host, I see a small number of trigger failures beginning at 6144 KB/s allocation rate with live memory 4096 MB out of heap size 10 GB. On this workload, I see slightly more trigger failures with the original free set implementation than with the new one. Here are the results of all my recent experiments:
An earlier comment had requested impact on SpecJBB. I have this information from an internal performance pipeline. Seems to improve critical-jops and max-jops, but also increases P100 jhiccup.
Many of our internal performance tools are defaulted for comparisons tor GenShen (and on the GenShen branch). Here is a graph showing key specjbb metrics comparing this branch against openjdk/jdk:master
:
Would be great to get some feedback also from either @shipilev or @rkennke . Thanks!
@kdnilsen This change now passes all automated pre-integration checks.
ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.
After integration, the commit message for the final commit will be:
8324649: Shenandoah: replace implementation of free set
Reviewed-by: wkemper, ysr, rkennke
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.
At the time when this comment was updated there had been 136 new commits pushed to the master
branch:
- 259915168d6656b1b8ddad03c377082d6a5224e5: 8331202: Support for Duration until another Instant
- 6f7ddbec7d0bc459d44b6518fe1d982eaba7f37b: 8260633: [macos] java/awt/dnd/MouseEventAfterStartDragTest/MouseEventAfterStartDragTest.html test failed
- fa3e94d30f11bdccbe290041ae19490ce4940bb1: 8332393: Problemlist compiler/rangechecks/TestArrayAccessAboveRCAfterRCCastIIEliminated.java
- a33cb9045b2c0cae7d894715d1484e77b7607de6: 8332098: Add missing @ since tags to jdk.jdi
- 910d77becd15580296687b00fed085ab106cb2eb: 8331953: ubsan: metaspaceShared.cpp:1305:57: runtime error: applying non-zero offset 12849152 to null pointer
- f9f8d0b48057a02923e36c8e11286b57cc72279e: 8332101: Add an
@since
toStandardOperation:REMOVE
injdk.dynalink
- f398cd225012694a586e528936159b6df7b1586c: 8331575: C2: crash when ConvL2I is split thru phi at LongCountedLoop
- 96c5c3fe75103dc45bc1c3ccce0ab36303121a60: 8329998: Remove double initialization for parts of small TypeArrays in ZObjArrayAllocator
- ee4a9d34827166ff9ac04e2375058fdc08e43194: 8321622: ClassFile.verify(byte[] bytes) throws unexpected ConstantPoolException, IAE
- ab8d7b0cedfaae124262325cd1d4b59cef996d85: 8324517: C2: crash in compiled code because of dependency on removed range check CastIIs
- ... and 126 more: https://git.openjdk.org/jdk/compare/b20fa7b48b0f0a64c0760f26188d4c11c3233b61...master
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.
As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@earthling-amzn, @ysramakrishna, @shipilev, @rkennke) but any other Committer may sponsor as well.
➡️ To flag this PR as ready for integration with the above commit message, type /integrate
in a new comment. (Afterwards, your sponsor types /sponsor
in a new comment to perform the integration).
I'm working on some performance regressions identified on certain tests. Converting to draft until these are resolved.
⚠️ @kdnilsen This pull request contains merges that bring in commits not present in the target repository. Since this is not a "merge style" pull request, these changes will be squashed when this pull request in integrated. If this is your intention, then please ignore this message. If you want to preserve the commit structure, you must change the title of this pull request to Merge <project>:<branch>
where <project>
is the name of another project in the OpenJDK organization (for example Merge jdk:master
).
Zero build and others look a bit broken.
@rkennke : Thanks for all your careful feedback. If you could be more specific about loops that might result in quadratic behavior, I'll look more closely. There are some loops within loops, but I'm thinking these are not quadratic because the inner loop bounds are constants.
/integrate
@kdnilsen Your change (at version 32191190cf0b104beb841a15d0d9857f96e67360) is now ready to be sponsored by a Committer.
/sponsor
Going to push as commit dc184f1099e09cef095cd8438d88dd8a1e6f5522.
Since your change was applied there have been 136 commits pushed to the master
branch:
- 259915168d6656b1b8ddad03c377082d6a5224e5: 8331202: Support for Duration until another Instant
- 6f7ddbec7d0bc459d44b6518fe1d982eaba7f37b: 8260633: [macos] java/awt/dnd/MouseEventAfterStartDragTest/MouseEventAfterStartDragTest.html test failed
- fa3e94d30f11bdccbe290041ae19490ce4940bb1: 8332393: Problemlist compiler/rangechecks/TestArrayAccessAboveRCAfterRCCastIIEliminated.java
- a33cb9045b2c0cae7d894715d1484e77b7607de6: 8332098: Add missing @ since tags to jdk.jdi
- 910d77becd15580296687b00fed085ab106cb2eb: 8331953: ubsan: metaspaceShared.cpp:1305:57: runtime error: applying non-zero offset 12849152 to null pointer
- f9f8d0b48057a02923e36c8e11286b57cc72279e: 8332101: Add an
@since
toStandardOperation:REMOVE
injdk.dynalink
- f398cd225012694a586e528936159b6df7b1586c: 8331575: C2: crash when ConvL2I is split thru phi at LongCountedLoop
- 96c5c3fe75103dc45bc1c3ccce0ab36303121a60: 8329998: Remove double initialization for parts of small TypeArrays in ZObjArrayAllocator
- ee4a9d34827166ff9ac04e2375058fdc08e43194: 8321622: ClassFile.verify(byte[] bytes) throws unexpected ConstantPoolException, IAE
- ab8d7b0cedfaae124262325cd1d4b59cef996d85: 8324517: C2: crash in compiled code because of dependency on removed range check CastIIs
- ... and 126 more: https://git.openjdk.org/jdk/compare/b20fa7b48b0f0a64c0760f26188d4c11c3233b61...master
Your commit was automatically rebased without conflicts.
@ysramakrishna @kdnilsen Pushed as commit dc184f1099e09cef095cd8438d88dd8a1e6f5522.
:bulb: You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.