RFR: 8369048: GenShen: Defer ShenFreeSet::available() during rebuild [v2]
Kelvin Nilsen
kdnilsen at openjdk.org
Wed Nov 12 00:58:45 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 incrementally with six additional commits since the last revision:
- 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
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/27612/files
- new: https://git.openjdk.org/jdk/pull/27612/files/a6898392..091e23bf
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=27612&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=27612&range=00-01
Stats: 63 lines in 7 files changed: 18 ins; 26 del; 19 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