Integrated: 8308387: CLD created and unloading list sharing _next node pointer leads to concurrent YC missing CLD roots
Axel Boldt-Christmas
aboldtch at openjdk.org
Fri Jun 2 06:38:17 UTC 2023
On Wed, 31 May 2023 08:28:20 GMT, Axel Boldt-Christmas <aboldtch at openjdk.org> wrote:
> [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
This pull request has now been integrated.
Changeset: 7b0a3360
Author: Axel Boldt-Christmas <aboldtch at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/7b0a33600e27507546d38c53bdbc482561e1154b
Stats: 108 lines in 5 files changed: 64 ins; 27 del; 17 mod
8308387: CLD created and unloading list sharing _next node pointer leads to concurrent YC missing CLD roots
Reviewed-by: stefank, coleenp, dholmes, eosterlund
-------------
PR: https://git.openjdk.org/jdk/pull/14241
More information about the hotspot-runtime-dev
mailing list