-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
8329528: G1 does not update TAMS correctly when dropping retained regions during Concurrent Start pause #18692
Conversation
👋 Welcome back tschatzl! A progress list of the required criteria for merging this PR into |
@tschatzl 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 45 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 |
72f183a
to
9819639
Compare
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.
The fix looks good. However, in the long run, pulling out the logic around G1NumCollectionsKeepPinned
from the cset construction seems cleaner. Also, NoteStartOfMarkHRClosure
can keep the original simpler condition.
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.
LGTM!
That is true at first glance, but when trying that out for this change, to me the drawbacks outweighed the cleanliness argument that resulted in much more code:
I think I considered this extra step for filtering when implementing this the first time, rejected it for all the extra effort (probably in the range of 100 LOC, see the diff for the 0c46d6a change - which is incomplete btw as it does not adjust the regression test and potentially add proper timing/logging) just to basically avoid this single Anyway, modifying this in this change at least it detracts from the problem at hand. I will file an RFE.
The additional clause is an arbitrary requirement/assumption by the existing code, asserting somewhere that cset regions do not have tams set initially. Could you approve the change if it looks good to you? |
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.
The fix is small and easy to backport; can probably further improve the logic around pinning&cset at later PRs.
Thanks @albertnetymk @walulyai for your reviews |
Going to push as commit ff5c9a4.
Your commit was automatically rebased without conflicts. |
Hi all,
please review this change to fix the problem that when g1 ages out regions from the retained region collection set candidate list during a concurrent start gc, the
TAMS
es of these regions are not set correctly.The change achieves this by changing the order of some calculations in
G1YoungCollector::pre_evacuate_collection_set
: instead of settingTAMS
es before collection set calculation, do it later, adjusting the predicate determining whether to update theTAMS
es at concurrent start pause start to exclude regions in the collection set.Several attempts for different fixes were tried, one of them is still viewable by only considering the changesets before the "alternate implementation" commit. However they quickly grew to fairly large size and complicated the code a lot.
Testing: tier1-3, test case not failing any more
Thanks,
Thomas
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/18692/head:pull/18692
$ git checkout pull/18692
Update a local copy of the PR:
$ git checkout pull/18692
$ git pull https://git.openjdk.org/jdk.git pull/18692/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 18692
View PR using the GUI difftool:
$ git pr show -t 18692
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/18692.diff
Webrev
Link to Webrev Comment