Skip to content

Conversation

@earthling-amzn
Copy link
Contributor

@earthling-amzn earthling-amzn commented Feb 5, 2025

There are several changes to the operation of Shenandoah's control threads here.

  • The reason for cancellation is now recorded in ShenandoahHeap::_cancelled_gc as a GCCause, instead of various member variables in the control thread.
    • The cancellation handling is driven entirely by the cancellation cause
    • The graceful shutdown, alloc failure, humongous alloc failure and preemption requested flags are all removed
    • The shutdown sequence is simpler
  • The generational control thread uses a lock to coordinate updates to the requested cause and generation
    • APIs have been simplified to avoid converting between the generation type and the actual generation instance
    • The old heuristic, rather than the control thread itself, is now responsible for resuming old generation cycles
    • The control thread doesn't loop on its own (unless the pacer is enabled).

Testing

  • jtreg hotspot_gc_shenandoah
  • dacapo, extremem, diluvian, specjbb2015, specjvm2018, heapothesys

Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8349094: GenShen: Race between control and regulator threads may violate assertions (Task - P4)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/23475/head:pull/23475
$ git checkout pull/23475

Update a local copy of the PR:
$ git checkout pull/23475
$ git pull https://git.openjdk.org/jdk.git pull/23475/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 23475

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/23475.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Feb 5, 2025

👋 Welcome back wkemper! 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 Feb 5, 2025

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

8349094: GenShen: Race between control and regulator threads may violate assertions

Reviewed-by: ysr, kdnilsen

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

  • 99fb350: 8350654: (fs) Files.createTempDirectory should say something about the default file permissions when no file attributes specified
  • 768b024: 8350682: [JMH] vector.IndexInRangeBenchmark failed with IndexOutOfBoundsException for size=1024
  • c4b516d: 8348322: AOT cache creation crashes with "All cached hidden classes must be aot-linkable" when AOTInvokeDynamicLinking is disabled
  • e470f47: 8350095: RISC-V: Refactor string_compare
  • f53de92: 8350931: RISC-V: remove unnecessary src register for fp_sqrt_d/f
  • e1fc14f: 8350940: RISC-V: remove unnecessary assert_different_registers in minmax_fp
  • 79880e5: 8351033: RISC-V: TestFloat16ScalarOperations asserts with offset (4210) is too large to be patched in one beq/bge/bgeu/blt/bltu/bne instruction!
  • bb70896: 8350903: Remove explicit libjvm.so dependency for libVThreadEventTest
  • 7c187b5: 8338737: Shenandoah: Reset marking bitmaps after the cycle
  • 3602c8c: 8350955: Fix repetitions of the word "the" in runtime component comments
  • ... and 23 more: https://git.openjdk.org/jdk/compare/e98df71d9c5120fbb73a4c2f49863775fe5db781...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 rfr Pull request is ready for review label Feb 5, 2025
@openjdk
Copy link

openjdk bot commented Feb 5, 2025

@earthling-amzn The following labels will be automatically applied to this pull request:

  • hotspot-gc
  • shenandoah

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.

@openjdk openjdk bot added hotspot-gc hotspot-gc-dev@openjdk.org shenandoah shenandoah-dev@openjdk.org labels Feb 5, 2025
@mlbridge
Copy link

mlbridge bot commented Feb 5, 2025

@earthling-amzn
Copy link
Contributor Author

/integrate delegate

@openjdk openjdk bot added the delegated May be integrated by another Committer label Feb 14, 2025
@openjdk
Copy link

openjdk bot commented Feb 14, 2025

@earthling-amzn Integration of this pull request has been delegated and may be completed by any project committer using the /integrate pull request command.

Copy link
Contributor

@kdnilsen kdnilsen left a comment

Choose a reason for hiding this comment

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

Thank you. This looks very clean to me.

Copy link
Member

@ysramakrishna ysramakrishna left a comment

Choose a reason for hiding this comment

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

Flushing the comments at EOD; will complete review later.

ShenandoahGenerationType generation = GLOBAL;

uint age_period = 0;
const int64_t wait_ms = ShenandoahPacing ? ShenandoahControlIntervalMin : 0;
Copy link
Member

Choose a reason for hiding this comment

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

So we are supporting ShenandoahPacing with GenShenm(at least till we pull it in the future), but don't want to enable it by default, correct?

Copy link
Member

@ysramakrishna ysramakrishna left a comment

Choose a reason for hiding this comment

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

A few random comments, mostly on documentation, and a few assertion suggestions.

Rest looks good. Thanks for tightening up the code via your changes in this PR.

I don't think I should need to re-review any changes you make stemming from my (rally quite minor) comments.

Reviewed; 🚢

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Feb 26, 2025
@openjdk openjdk bot removed the ready Pull request is ready to be integrated label Feb 26, 2025
Copy link
Member

@ysramakrishna ysramakrishna left a comment

Choose a reason for hiding this comment

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

🚢

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Mar 3, 2025
@earthling-amzn
Copy link
Contributor Author

/integrate

@openjdk
Copy link

openjdk bot commented Mar 4, 2025

Going to push as commit 3a8a432.
Since your change was applied there have been 33 commits pushed to the master branch:

  • 99fb350: 8350654: (fs) Files.createTempDirectory should say something about the default file permissions when no file attributes specified
  • 768b024: 8350682: [JMH] vector.IndexInRangeBenchmark failed with IndexOutOfBoundsException for size=1024
  • c4b516d: 8348322: AOT cache creation crashes with "All cached hidden classes must be aot-linkable" when AOTInvokeDynamicLinking is disabled
  • e470f47: 8350095: RISC-V: Refactor string_compare
  • f53de92: 8350931: RISC-V: remove unnecessary src register for fp_sqrt_d/f
  • e1fc14f: 8350940: RISC-V: remove unnecessary assert_different_registers in minmax_fp
  • 79880e5: 8351033: RISC-V: TestFloat16ScalarOperations asserts with offset (4210) is too large to be patched in one beq/bge/bgeu/blt/bltu/bne instruction!
  • bb70896: 8350903: Remove explicit libjvm.so dependency for libVThreadEventTest
  • 7c187b5: 8338737: Shenandoah: Reset marking bitmaps after the cycle
  • 3602c8c: 8350955: Fix repetitions of the word "the" in runtime component comments
  • ... and 23 more: https://git.openjdk.org/jdk/compare/e98df71d9c5120fbb73a4c2f49863775fe5db781...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Mar 4, 2025
@openjdk openjdk bot closed this Mar 4, 2025
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review delegated May be integrated by another Committer labels Mar 4, 2025
@openjdk
Copy link

openjdk bot commented Mar 4, 2025

@earthling-amzn Pushed as commit 3a8a432.

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

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 shenandoah shenandoah-dev@openjdk.org

Development

Successfully merging this pull request may close these issues.

3 participants