RFR: 8308387: CLD created and unloading list sharing _next node pointer leads to concurrent YC missing CLD roots [v2]
Axel Boldt-Christmas
aboldtch at openjdk.org
Wed May 31 11:08:06 UTC 2023
> [JDK-8307106](https://bugs.openjdk.org/browse/JDK-8307106) introduced the ability to walk the created CLDs list in the CLDG without a lock. This was primarily introduced to allow lockless concurrent CLD roots scanning for young collections in generational ZGC. However because the CLD _next node pointer is shared between the two list this can lead to a concurrent iteration of the created CLDs missing list entries.
>
> This change introduces a second _unloading_next node pointer which is used for the unloading CLDs list. The set_next is now maintains the invariant that it only ever unlinks is_unloading() CLDs and maintains a consistent view of the tail list for anyone reading the list concurrently.
>
> Testing: tier1-3 and tier1-7 with Generational ZGC
Axel Boldt-Christmas has updated the pull request incrementally with one additional commit since the last revision:
Stefank feedback: introduce unlink_next, rework do_unloading loop
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/14241/files
- new: https://git.openjdk.org/jdk/pull/14241/files/f0ca7174..13b1748d
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=14241&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=14241&range=00-01
Stats: 54 lines in 4 files changed: 9 ins; 25 del; 20 mod
Patch: https://git.openjdk.org/jdk/pull/14241.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/14241/head:pull/14241
PR: https://git.openjdk.org/jdk/pull/14241
More information about the hotspot-runtime-dev
mailing list