Skip to content

8338534: Shenandoah: Handle alloc failure differently when immediate garbage is available - #32034

Draft
earthling-amzn wants to merge 5 commits into
openjdk:pr/31797from
earthling-amzn:decouple-waiters
Draft

8338534: Shenandoah: Handle alloc failure differently when immediate garbage is available#32034
earthling-amzn wants to merge 5 commits into
openjdk:pr/31797from
earthling-amzn:decouple-waiters

Conversation

@earthling-amzn

@earthling-amzn earthling-amzn commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

This change creates separate monitors for threads waiting because of an allocation failure and threads waiting for a complete gc cycle (this is as things are on master). The respective monitors are acquired on different code paths (request_gc, handle_alloc_failure, handle_alloc_failure_full). Separating them like this avoids spurious wakeups from incomplete old marking increments (which neither free up memory nor complete a cycle). It also allows alloc failure waiters to be woken up midcycle after final mark reclaims immediate garbage without also waking up threads waiting for a complete cycle. Finally, this change consolidates several methods duplicated between ShControlThread and ShGenerationalControlThread into their ShController base class.



Progress

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

Integration blocker

 ⚠️ Dependency #31797 must be integrated first

Issue

  • JDK-8338534: Shenandoah: Handle alloc failure differently when immediate garbage is available (Enhancement - P4)

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 32034

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@bridgekeeper

bridgekeeper Bot commented Jul 23, 2026

Copy link
Copy Markdown

👋 Welcome back wkemper! A progress list of the required criteria for merging this PR into pr/31797 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 commented Jul 23, 2026

Copy link
Copy Markdown

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk openjdk Bot added hotspot-gc hotspot-gc-dev@openjdk.org shenandoah shenandoah-dev@openjdk.org labels Jul 23, 2026
@openjdk

openjdk Bot commented Jul 23, 2026

Copy link
Copy Markdown

@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 commented Jul 23, 2026

Copy link
Copy Markdown

The total number of required reviews for this PR has been set to 2 based on the presence of this label: hotspot-gc. This can be overridden with the /reviewers command.

@openjdk openjdk Bot added the rfr Pull request is ready for review label Jul 23, 2026
@mlbridge

mlbridge Bot commented Jul 23, 2026

Copy link
Copy Markdown

Webrevs

@earthling-amzn
earthling-amzn marked this pull request as draft July 24, 2026 17:28
@openjdk openjdk Bot removed the rfr Pull request is ready for review label Jul 24, 2026
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 shenandoah shenandoah-dev@openjdk.org

Development

Successfully merging this pull request may close these issues.

1 participant