Integrated: 8370041: GenShen: Filter young pointers from thread local SATB buffers when only marking old

William Kemper wkemper at openjdk.org
Thu Nov 6 19:40:14 UTC 2025


On Fri, 24 Oct 2025 21:00:40 GMT, William Kemper <wkemper at openjdk.org> wrote:

> When GenShen is only marking the old generation, we do not need the SATB mechanism to preserve young pointers. We currently filter these out of the SATB buffers during the final-update-refs and init-mark safepoints. This increases latency and introduces no small amount of complexity. It should be possible to instead filter out these pointers when the SATB buffers are 'compacted' before being 'completed'.
> 
> # Background
> When GenShen is marking the old generation it leaves the SATB barrier enabled. When a young collection interrupts old marking, it creates a situation where a mutator thread could overwrite a field holding a pointer into a collection set region. The SATB barrier will dutifully place this object in the SATB queue. If this pointer makes it into a mark queue, the marking thread will crash. Prior to this change, GenShen filtered out such pointers _after_ the thread local SATB buffers were completed. After this change, such pointers are filtered out _before_ the buffers are completed. This is more inline with the natural way of things.

This pull request has now been integrated.

Changeset: cad73d39
Author:    William Kemper <wkemper at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/cad73d39762974776dd6fda5efe4e2a271d69f14
Stats:     331 lines in 11 files changed: 108 ins; 198 del; 25 mod

8370041: GenShen: Filter young pointers from thread local SATB buffers when only marking old

Reviewed-by: ysr, kdnilsen

-------------

PR: https://git.openjdk.org/jdk/pull/27983


More information about the hotspot-gc-dev mailing list