RFR: 8369048: GenShen: Defer ShenFreeSet::available() during rebuild [v5]
Kelvin Nilsen
kdnilsen at openjdk.org
Mon Jan 12 21:43:57 UTC 2026
> 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 two additional commits since the last revision:
- Use appropriate locks for ShenFreeSet used() and capacity()
- Revert "Add rebuild synchronization to capacity() and used()"
This reverts commit 3c29dc10b17f1856203135a31b75c3afea16ba50.
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/27612/files
- new: https://git.openjdk.org/jdk/pull/27612/files/3c29dc10..300a256a
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=27612&range=04
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=27612&range=03-04
Stats: 16 lines in 4 files changed: 7 ins; 0 del; 9 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 shenandoah-dev
mailing list