Integrated: Concurrent remembered set scanning
Kelvin Nilsen
kdnilsen at openjdk.java.net
Thu Jul 22 14:32:29 UTC 2021
On Tue, 11 May 2021 14:40:15 GMT, Kelvin Nilsen <kdnilsen at openjdk.org> wrote:
> This pull request includes code to perform remembered set scanning concurrently with ongoing mutator execution. As currently implemented, the remembered set is copied to a read-only remembered set during init-mark safepoint. After copying, all cards in the remembered set are restored to a clean value. Following the init-mark safepoint, mutator thread write barriers update the active remembered set copy every time a reference field is overwritten by dirtying the corresponding cards.
>
> Concurrent remembered set scanning for the purpose of marking works with the read-only copy of the remembered set. When concurrent remembered set scanning encounters an interesting pointer, the corresponding card of the active remembered set is overwritten dirty.
>
> The remembered set is scanned a second time concurrently during the update-refs phase of gc. The second scan uses the same read/write active copy of the remembered set that is being overwritten by the mutator write barrier.
>
> The SATB barrier and load reference barriers are sufficient to resolve any races between setting of dirty flags and scanning of the remembered set.
>
> A possible future enhancement involves replacing the remembered set copy (during init-mark safepoint) with a simple pointer swap operation to exchange the roles of a read-byte-map and a write-byte-map. Making this change is deferred because it requires far-reaching changes to the implementations of mutator write barriers. As currently implemented, these barriers hard-code the address of the card-table byte map.
>
> This patch passes tier1 and hotspot_gc_shenandoah regression tests.
This pull request has now been integrated.
Changeset: d775516e
Author: Kelvin Nilsen <kdnilsen at openjdk.org>
Committer: Roman Kennke <rkennke at openjdk.org>
URL: https://git.openjdk.java.net/shenandoah/commit/d775516e9b2216735fa059f8e986c7a8d280c9f0
Stats: 1658 lines in 46 files changed: 1287 ins; 123 del; 248 mod
Concurrent remembered set scanning
Reviewed-by: rkennke
-------------
PR: https://git.openjdk.java.net/shenandoah/pull/37
More information about the shenandoah-dev
mailing list