Skip to content

Conversation

kdnilsen
Copy link
Contributor

@kdnilsen kdnilsen commented Oct 2, 2025

This code introduces a new rebuild-freeset lock for purposes of coordinating the freeset rebuild activities and queries as to memory available for allocation in the mutator partition.

This addresses a problem that results if available memory is probed while we are rebuilding the freeset.

Rather than using the existing global heap lock to synchronize these activities, a new more narrowly scoped lock is introduced. This allows the available memory to be probed even when other activities hold the global heap lock for reasons other than rebuilding the freeset, such as when they are allocating memory. It is known that the global heap lock is heavily contended for certain workloads, and using this new lock avoids adding to contention for the global heap lock.


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-8369048: GenShen: Defer ShenFreeSet::available() during rebuild (Enhancement - P4)

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 27612

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

Using diff file

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

@kdnilsen kdnilsen marked this pull request as draft October 2, 2025 17:58
@kdnilsen
Copy link
Contributor Author

kdnilsen commented Oct 2, 2025

Will identify this PR as draft until I complete performance and correctness tests.

@bridgekeeper
Copy link

bridgekeeper bot commented Oct 2, 2025

👋 Welcome back kdnilsen! 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 Oct 2, 2025

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

@kdnilsen kdnilsen changed the title 8369048: GenShen: Defer ShenFreeSet::available() during rebuildAdd support for freeset rebuild lock 8369048: GenShen: Defer ShenFreeSet::available() during rebuild Oct 2, 2025
@openjdk
Copy link

openjdk bot commented Oct 2, 2025

@kdnilsen 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

1 participant