-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8361252: Compact Full-GC Forwarding #26133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
👋 Welcome back rkennke! A progress list of the required criteria for merging this PR into |
|
❗ This change is not yet ready to be integrated. |
|
@rkennke this pull request can not be integrated into git checkout JDK-8361252
git fetch https://git.openjdk.org/jdk.git master
git merge FETCH_HEAD
# resolve conflicts and follow the instructions given by git merge
git commit -m "Merge master"
git push |
|
@rkennke This pull request has been inactive for more than 8 weeks and will be automatically closed if another 8 weeks passes without any activity. To avoid this, simply issue a |
|
@rkennke This pull request has been inactive for more than 16 weeks and will now be automatically closed. If you would like to continue working on this pull request in the future, feel free to reopen it! This can be done using the |
I'd like to propose a new Full-GC forwarding scheme for the Serial, Parallel, G1 and Shenandoah GCs.
Primarily, it solves a limitation when compact object headers are turned on: the above mentioned GCs can then not handle heaps > 8TB, and we turn off compact object headers, instead. I realize that this is most likely not an issue in practice for Serial GC (who would want this?). It may be an issue with Parallel and G1 GCs (I know some folks run with Parallel GC on large batch jobs, where latency is not a concern at all. G1 may be useful in the same situation, perhaps). It is an issue with Shenandoah GC, because large heaps is one reason why Shenandoah exists to begin with. (ZGC doesn't have this problem, because it does not have a full-GC.) Given that I think we should make compact object headers on by default in JDK 26, and obsolete the old mode in JDK 27, I think it'd be useful to have the new implementation available now.
Second, it's a first step and preparation towards 4-byte-headers, which I hope to bring into JDK 27. With 4-byte-headers, we only have 9 bits in the header for storing forwarding-pointers during full-GC, and this implementation provides that with minimal overhead.
I've proposed something similar before (see #20605), but this improved implementation is simpler, uses less memory overhead, and has basically no performance impact.
There is a large comment at the top of fullGCForwarding.hpp which explains the algorithm in detail. I am not repeating it here. I'll just state some basic properties:
In order to facilitate testing and later reduction of the implementation to fewer bits, I template-ized the forwarding table implementation on the number of bits. This allows me to write unit tests that don't take >8TB of heap and stress some of the interesting scenarios, without affecting performance in normal HotSpot product situations.
Testing:
Progress
Warnings
Issue
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/26133/head:pull/26133$ git checkout pull/26133Update a local copy of the PR:
$ git checkout pull/26133$ git pull https://git.openjdk.org/jdk.git pull/26133/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 26133View PR using the GUI difftool:
$ git pr show -t 26133Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/26133.diff