summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2019-05-11 19:14:43 -0400
committerBen Gamari <ben@smart-cactus.org>2019-10-22 12:18:39 -0400
commit786c52d25e94e578a7d76772fbc18fac0ea1b458 (patch)
tree290b932a5cf76d55c9e6542fb368494150631bd1
parentdacf4cae179e4f9ee67cd2a5e0c9de7900b5f274 (diff)
downloadhaskell-786c52d25e94e578a7d76772fbc18fac0ea1b458.tar.gz
NonMoving: Prefetch when clearing bitmaps
Ensure that the bitmap of the segmentt that we will clear next is in cache by the time we reach it.
-rw-r--r--rts/sm/NonMoving.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/rts/sm/NonMoving.c b/rts/sm/NonMoving.c
index 8b27581386..b8c690d4a0 100644
--- a/rts/sm/NonMoving.c
+++ b/rts/sm/NonMoving.c
@@ -497,6 +497,8 @@ static void nonmovingClearBitmap(struct NonmovingSegment *seg)
static void nonmovingClearSegmentBitmaps(struct NonmovingSegment *seg)
{
while (seg) {
+ prefetchForRead(seg->link);
+ prefetchForWrite(seg->link->bitmap);
nonmovingClearBitmap(seg);
seg = seg->link;
}