Closed Bug 1508244 Opened 7 years ago Closed 6 years ago

Investigate making marking state atomic

Categories

(Core :: JavaScript: GC, enhancement, P3)

61 Branch
enhancement

Tracking

()

RESOLVED DUPLICATE of bug 1424934

People

(Reporter: jonco, Unassigned)

References

(Blocks 1 open bug)

Details

Currently we store marking state in a bitmap at the end of each chunk, with two bits per possible cell start position in an arena. As a consequence, state for more than one cell can share the same location in memory. For parallel/concurrent GC we would really like to have one byte per cell and make this atomic. This could be accomplished by moving this state to the start of the arena (after the header) and making it one byte per cell. Possible drawbacks: This may be less cache friendly during marking since all mark bits are not stored together. However if this enables concurrent or parallel marking then that wouldn't matter. This may results in higher memory use because we use one byte per cell. However the current scheme depends on the cell kind and wastes memory for arenas with large cells. So this may not end up being a big change.
(In reply to Jon Coppeard (:jonco) from comment #0) I forgot to mention a complication: atom marking. We store a conservative approximation of the atoms referenced from each zone as a separate bitmap. Currently we use the same representation as the marking bitmap. We will need to check the memory overhead of the new byte-per-cell approach. It may be preferably to use a compressed scheme (one bit per cell), but that would have performance implications. This will need to be investigated.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.