NonMoving: Prefetch when clearing bitmaps
authorBen Gamari <ben@smart-cactus.org>
Sat, 11 May 2019 23:14:43 +0000 (19:14 -0400)
committerBen Gamari <ben@smart-cactus.org>
Wed, 19 Jun 2019 01:42:04 +0000 (21:42 -0400)
Ensure that the bitmap of the segmentt that we will clear next is in
cache by the time we reach it.

rts/sm/NonMoving.c

index 45d2bdd..dd8ad2f 100644 (file)
@@ -474,6 +474,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;
     }