RFR: 8369048: GenShen: Defer ShenFreeSet::available() during rebuild
Kelvin Nilsen
kdnilsen at openjdk.org
Tue Oct 7 15:24:24 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.
-------------
Commit messages:
- Revert "revert introduction of RebuildLock"
- Revert "available() returns previous value if called during freeset rebuild"
- Revert "remove obsolete assertion"
- remove obsolete assertion
- available() returns previous value if called during freeset rebuild
- revert introduction of RebuildLock
- reduce gratuitous diffs from tip
- Treat traditional Shenandoah same as Generational Shenandoah
- fix whitespace
- Add support for freeset rebuild lock
Changes: https://git.openjdk.org/jdk/pull/27612/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=27612&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8369048
Stats: 37 lines in 5 files changed: 20 ins; 0 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