From 8e79e2a973c1e4730a1caf402898f6607f84af45 Mon Sep 17 00:00:00 2001 From: Ben Gamari Date: Wed, 8 May 2019 21:28:35 -0400 Subject: Unconditionally flush update remembered set during minor GC Flush the update remembered set. The goal here is to flush periodically to ensure that we don't end up with a thread who marks their stack on their local update remembered set and doesn't flush until the nonmoving sync period as this would result in a large fraction of the heap being marked during the sync pause. --- rts/sm/GC.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'rts/sm/GC.c') diff --git a/rts/sm/GC.c b/rts/sm/GC.c index 6be81e5ff0..83e9c97bd9 100644 --- a/rts/sm/GC.c +++ b/rts/sm/GC.c @@ -730,6 +730,14 @@ GarbageCollect (uint32_t collect_gen, } } // for all generations + // Flush the update remembered set. See Note [Eager update remembered set + // flushing] in NonMovingMark.c + if (RtsFlags.GcFlags.useNonmoving) { + RELEASE_SM_LOCK; + nonmovingAddUpdRemSetBlocks(&gct->cap->upd_rem_set.queue); + ACQUIRE_SM_LOCK; + } + // Mark and sweep the oldest generation. // N.B. This can only happen after we've moved // oldest_gen->scavenged_large_objects back to oldest_gen->large_objects. -- cgit v1.2.1