Skip to content

8264026: Remove dependency between free collection set and eagerly reclaim humongous object tasks #3154

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

Closed

Conversation

tschatzl
Copy link
Contributor

@tschatzl tschatzl commented Mar 23, 2021

Hi,

I am currently working on JDK-8214237 to merge some phases from G1CollectedHeap::post_evacuate_collection_set() into less parallel phases.

While investigating dependencies I found that free_collection_set and eagerly_reclaim_humongous_regions have a dependency: free_collection_set rebuilds the free list at the end (in another parallel phase :( ), and eagerly_reclaim_humongous_regions adds to those regions.

This dependency is unnecessary: just move the rebuilding of the free list after eagerly reclaiming humongous regions, and neither needs to care about updating the free regions list.

Testing: hs-tier1-5


Progress

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

Issue

  • JDK-8264026: Remove dependency between free collection set and eagerly reclaim humongous object tasks

Reviewers

Download

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

To update a local copy of the PR:
$ git checkout pull/3154
$ git pull https://git.openjdk.java.net/jdk pull/3154/head

@tschatzl tschatzl marked this pull request as ready for review March 23, 2021 15:17
@bridgekeeper
Copy link

bridgekeeper bot commented Mar 23, 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 openjdk bot added the rfr Pull request is ready for review label Mar 23, 2021
@openjdk
Copy link

openjdk bot commented Mar 23, 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 Mar 23, 2021
@mlbridge
Copy link

mlbridge bot commented Mar 23, 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, one comment below.

decrement_summary_bytes(cl.bytes_freed());

phase_times()->record_fast_reclaim_humongous_time_ms((os::elapsedTime() - start_time) * 1000.0,
cl.humongous_objects_reclaimed());
}

void G1CollectedHeap::rebuild_free_region_list() {
Ticks start = Ticks::now();
_hrm.rebuild_free_list(workers());
Copy link
Contributor

Choose a reason for hiding this comment

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

The first thing done inrebuild_free_list() is to drop the current free_list to rebuild if from scratch. So we should now be able to remove the call prepend_to_freelist(&local_cleanup_list) in eagerly_reclaim_humongous_regions(). Doing so the local_cleanup_list is only used for printing, and we should probably investigate if this can be done differently.

Copy link
Contributor Author

@tschatzl tschatzl Mar 24, 2021

Choose a reason for hiding this comment

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

There is JDK-8264027 filed for this. For now I was planning to keep this gathering of regions into the list but just factor out the printing code (as it's copy&pasted a bit), but we can certainly talk about more invasive measures.

The only way I see for now is that instead of gathering the elements in the list and printing in one go is printing immediately if we keep this functionality...

Thanks for your review.

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree, I think printing as we go sounds reasonable.

@openjdk
Copy link

openjdk bot commented Mar 23, 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:

8264026: Remove dependency between free collection set and eagerly reclaim humongous object tasks

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 50 new commits pushed to the master branch:

  • 45e1bab: 8264091: Use the blessed modifier order in java.logging
  • cb776ed: 8263981: java.awt.image.ComponentSampleModel equals/hashcode use numBands twice
  • da512bf: 8264050: Remove unused field VM_HeapWalkOperation::_collecting_heap_roots
  • 6e3a158: 8263352: assert(use == polladr) failed: the use should be a safepoint polling
  • 8d63bb6: 8260565: JFR: Fix copyright header in tests
  • 0b2aa1b: 8263978: Clarify why 0 argument is ignored in SecureRandom::setSeed
  • 15bcf6d: 8264055: backout JDK-8248904 in order to resubmit with additional attribution.
  • 2425462: 8263903: Use Cleaner instead of finalize to auto stop Timer thread
  • 35102cb: 8263992: Remove dead code NativeLookup::base_library_lookup
  • 91d86e6: 8263572: Output from jstack mixed mode is misaligned
  • ... and 40 more: https://git.openjdk.java.net/jdk/compare/a9d2267f8d306522522c999ff584ccaa34c46456...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.

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

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Mar 23, 2021
@tschatzl
Copy link
Contributor Author

/integrate

@openjdk openjdk bot closed this Mar 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 Mar 24, 2021
@openjdk
Copy link

openjdk bot commented Mar 24, 2021

@tschatzl Since your change was applied there have been 63 commits pushed to the master branch:

  • deda80f: 8264057: [redo] JDK-8248904: Add support to jpackage for the Mac App Store.
  • 57c3f27: 8263989: Cleanup in EA
  • 4d8e986: 8261966: macOS M1: report in hs_err log if we are running x86 code in emulation mode (Rosetta)
  • bc91596: 8264051: Remove unused TRAPS parameters from runtime functions
  • 5d7e93c: 8264004: Don't use TRAPS if no exceptions are thrown
  • 9ee0b9a: 8264052: Shenandoah: Backout 8263832
  • e55aa41: 8263899: HttpClient throws NPE in AuthenticationFilter when parsing www-authenticate head
  • 6c0fbf7: 8254196: jshell infinite loops when startup script contains System.exit call
  • a79f095: 8263721: Unify oop casting
  • 329697b: 8263358: Update java.lang to use instanceof pattern variable
  • ... and 53 more: https://git.openjdk.java.net/jdk/compare/a9d2267f8d306522522c999ff584ccaa34c46456...master

Your commit was automatically rebased without conflicts.

Pushed as commit 3aee5ad.

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

@tschatzl tschatzl deleted the 8264026-remove-free-cset-dependency branch March 24, 2021 16:02
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