RFR: 8314972: GenShen: promote_in_place needs to prepare remembered set before it enables old allocations within region
Kelvin Nilsen
kdnilsen at openjdk.org
Fri Aug 25 16:28:09 UTC 2023
An error in the original implementation left us vulnerable to a race between a worker thread which is promoting a region in place and another worker or mutator thread who is allocating memory for old objects within the same region.
This PR prevents this race by requiring the worker thread that promotes a region in place to finish the preparation of the region's remembered set before it makes the region available to other threads for allocation of old-gen memory.
-------------
Commit messages:
- Use top_before_promote() to prepare remembered set
- Fix object registry before promoting young region in place
Changes: https://git.openjdk.org/shenandoah/pull/310/files
Webrev: https://webrevs.openjdk.org/?repo=shenandoah&pr=310&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8314972
Stats: 59 lines in 1 file changed: 29 ins; 30 del; 0 mod
Patch: https://git.openjdk.org/shenandoah/pull/310.diff
Fetch: git fetch https://git.openjdk.org/shenandoah.git pull/310/head:pull/310
PR: https://git.openjdk.org/shenandoah/pull/310
More information about the shenandoah-dev
mailing list