Skip to content

Conversation

@tschatzl
Copy link
Contributor

@tschatzl tschatzl commented Sep 8, 2021

Hi all,

can I have reviews for this change that moves young gc evacuation failure handling (G1EvacFailureRegions) from G1CollectedHeap to G1YoungCollector.

Testing: tier1-3

Thanks,
Thomas


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8273492: Move evacuation failure handling into G1YoungCollector

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/5419/head:pull/5419
$ git checkout pull/5419

Update a local copy of the PR:
$ git checkout pull/5419
$ git pull https://git.openjdk.java.net/jdk pull/5419/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 5419

View PR using the GUI difftool:
$ git pr show -t 5419

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/5419.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Sep 8, 2021

👋 Welcome back tschatzl! 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.

@openjdk
Copy link

openjdk bot commented Sep 8, 2021

@tschatzl The following label will be automatically applied to this pull request:

  • hotspot-gc

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the hotspot-gc hotspot-gc-dev@openjdk.org label Sep 8, 2021
@tschatzl tschatzl marked this pull request as ready for review September 8, 2021 15:27
@openjdk openjdk bot added the rfr Pull request is ready for review label Sep 8, 2021
@mlbridge
Copy link

mlbridge bot commented Sep 8, 2021

Webrevs

Copy link
Contributor

@kstefanj kstefanj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good in general, just one question.

trace_phase(_gc_par_phases[RedirtyCards]);
debug_time("Post Evacuate Cleanup 2", _cur_post_evacuate_cleanup_2_time_ms);
if (G1CollectedHeap::heap()->evacuation_failed()) {
if (_gc_par_phases[RestorePreservedMarks]->uninitialized()) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks a bit strange, why isn't this check using the passed in evacuation_failed like above? And if it can't shouldn't the check be !_gc_par_phases[RestorePreservedMarks]->uninitialized()?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably some oversight when implementing some variants in that area. Will fix.

@openjdk
Copy link

openjdk bot commented Sep 20, 2021

@tschatzl this pull request can not be integrated into master due to one or more merge conflicts. To resolve these merge conflicts and update this pull request you can run the following commands in the local repository for your personal fork:

git checkout submit/8273492-move-evac-failure-handling-to-younggc
git fetch https://git.openjdk.java.net/jdk master
git merge FETCH_HEAD
# resolve conflicts and follow the instructions given by git merge
git commit -m "Merge master"
git push

@openjdk openjdk bot added the merge-conflict Pull request has merge conflict with target branch label Sep 20, 2021
@openjdk
Copy link

openjdk bot commented Sep 20, 2021

@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:

8273492: Move evacuation failure handling into G1YoungCollector

Reviewed-by: sjohanss, ayang

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 no new commits pushed to the master branch. If another commit should be pushed before you perform the /integrate command, your PR will be automatically rebased. If you prefer to avoid any potential automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added ready Pull request is ready to be integrated and removed merge-conflict Pull request has merge conflict with target branch labels Sep 20, 2021
Copy link
Member

@albertnetymk albertnetymk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the original placement about the design, update stats iff evac_fail == false, is better; this is sth internal to G1Policy, not a caller's decision. IOW, sth like:

G1Policy::record_young_collection_end(bool concurrent_operation_is_full_mark, bool evac_fail) {
  // Evacuation failures skew the timing too much ...
  update_stats = !evac_fail;
}

The same apply to G1Policy::record_pause.

Not strictly part of this PR:

num_regions_failed_evacuation is just a getter, right? Why the name difference btw the method and the field?

@openjdk openjdk bot added merge-conflict Pull request has merge conflict with target branch and removed ready Pull request is ready to be integrated labels Sep 24, 2021
@tschatzl
Copy link
Contributor Author

I think the original placement about the design, update stats iff evac_fail == false, is better; this is sth internal to G1Policy, not a caller's decision. IOW, sth like:

G1Policy::record_young_collection_end(bool concurrent_operation_is_full_mark, bool evac_fail) {
  // Evacuation failures skew the timing too much ...
  update_stats = !evac_fail;
}

The same apply to G1Policy::record_pause.

I agree with record_young_collection_end, but I am not that confident about record_pause. The latter is an internal API and directly controlled by the respective record_xxx_end methods only. However this is not a strong opinion so I changed it as well.

Not strictly part of this PR:

num_regions_failed_evacuation is just a getter, right? Why the name difference btw the method and the field?

I think this is coming from the collection set where the same naming (_cur_length) has been introduced to indicate the current length of the array used to gather elements. Should maybe be both renamed.

@openjdk openjdk bot added ready Pull request is ready to be integrated and removed merge-conflict Pull request has merge conflict with target branch labels Sep 24, 2021
@tschatzl
Copy link
Contributor Author

Thanks @kstefanj @albertnetymk for your reviews.

/integrate

@openjdk
Copy link

openjdk bot commented Sep 24, 2021

Going to push as commit 341de49.
Since your change was applied there have been 7 commits pushed to the master branch:

  • 13e9ea9: 8273297: AES/GCM non-AVX512+VAES CPUs suffer after 8267125
  • 753b256: 8274296: Update or Problem List tests which may fail with uiScale=2 on macOS
  • baafa60: 8274237: Replace 'for' cycles with iterator with enhanced-for in java.base
  • 0c050be: 8274294: ProblemList sun/tools/jmap/BasicJMapTest.java
  • e741a18: 8274233: Minor cleanup for ToolBox
  • 718eff2: 8273380: ARM32: Default to {ldrexd,strexd} in StubRoutines::atomic_{load|store}_long
  • f214d6e: 8274234: Remove unnecessary boxing via primitive wrapper valueOf(String) methods in java.sql.rowset

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot closed this Sep 24, 2021
@openjdk openjdk bot added integrated Pull request has been integrated and removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Sep 24, 2021
@openjdk
Copy link

openjdk bot commented Sep 24, 2021

@tschatzl Pushed as commit 341de49.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@tschatzl tschatzl deleted the submit/8273492-move-evac-failure-handling-to-younggc branch October 7, 2021 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hotspot-gc hotspot-gc-dev@openjdk.org integrated Pull request has been integrated

Development

Successfully merging this pull request may close these issues.

3 participants