-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8370039: GenShen: array copy SATB barrier improvements #28183
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
base: master
Are you sure you want to change the base?
Conversation
|
👋 Welcome back wkemper! A progress list of the required criteria for merging this PR into |
|
@earthling-amzn 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: 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 117 new commits pushed to the
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. ➡️ To integrate this PR with the above commit message to the |
|
@earthling-amzn The following labels will be automatically applied to this pull request:
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
|
| fwd = _heap->evacuate_object(obj, thread); | ||
| } | ||
| shenandoah_assert_forwarded_except(elem_ptr, obj, _heap->cancelled_gc()); | ||
| ShenandoahHeap::atomic_update_oop(fwd, elem_ptr, o); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the comment at the start of arraycopy_work() still relevant? The description of the PR suggests that we will no longer call arraycopy_work() twice, but I'm not sure I fully understand the context of that statement.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We used to call this twice (as arraycopy_marking for each object if young and old marking were both in progress). The comment at the start is trying to explain how the arraycopy_work could be called with different template parameters depending on the gc_state. It is confusingly worded, but I believe the comment is correct and the code is wrong here. The way the code is in the PR, it would effectively turn off the old SATB during young evacuation and young update-refs, which is not what we want. Good catch!
ysramakrishna
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the clean up and corrections.
I am curious how you found this issue -- nice catch!
Any performance data to share, may be even from a microbenchmark perhaps or any other benchmark that exercises array copying -- may be something in DaCapo/Renaissance?
When an array copy happens concurrently with old and young marking, Shenandoah's generational mode walks over the array twice. This is unnecessary and increases the workload for marking threads. It also has been unconditionally enqueuing old references during a young mark. This is also unnecessary and also increases marking workload. Finally, the barrier went through a somewhat complicated decision process based on affiliation of the region where the array resides. However, the barrier must consider the affiliation of objects that are pointed at by array elements.
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/28183/head:pull/28183$ git checkout pull/28183Update a local copy of the PR:
$ git checkout pull/28183$ git pull https://git.openjdk.org/jdk.git pull/28183/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 28183View PR using the GUI difftool:
$ git pr show -t 28183Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/28183.diff
Using Webrev
Link to Webrev Comment