RFR: 8369048: GenShen: Defer ShenFreeSet::available() during rebuild [v3]
Kelvin Nilsen
kdnilsen at openjdk.org
Thu Nov 13 18:12:38 UTC 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.
Kelvin Nilsen has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 17 commits:
- Merge remote-tracking branch 'jdk/master' into synchronize-available-with-rebuild
- update comment
- Add documentation for _rebuild_lock
- Hide rebuild_lock inside prepare_to_rebuild and finish_rebuild
- Rename rebuild_lock()
- Tighten up context for holding rebuild_lock
- Remove ShenandoahFreeSet::FreeSetUnderConstruction sentinel value
- Revert "revert introduction of RebuildLock"
This reverts commit bec73da1dc169d391e9919203e5a406ea02a699c.
- Revert "available() returns previous value if called during freeset rebuild"
This reverts commit 1a5e483a4abb04b6045175e8bd4b0c11fa68cb73.
- Revert "remove obsolete assertion"
This reverts commit 717e7da17f03f1e52008d154fafcbbfc5f2bb20e.
- ... and 7 more: https://git.openjdk.org/jdk/compare/bfc048ab...8462a290
-------------
Changes: https://git.openjdk.org/jdk/pull/27612/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=27612&range=02
Stats: 90 lines in 7 files changed: 44 ins; 29 del; 17 mod
Patch: https://git.openjdk.org/jdk/pull/27612.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/27612/head:pull/27612
PR: https://git.openjdk.org/jdk/pull/27612
More information about the hotspot-gc-dev
mailing list