Skip to content

rts/NonMovingSweep: Fix locking of new mutable list allocation

Ben Gamari requested to merge wip/T17539 into master

Previously we used allocBlockOnNode_sync in nonmovingSweepMutLists despite the fact that we aren't in the GC and therefore the allocation spinlock isn't in use. This meant that sweep would end up spinning until the next minor GC, when the SM lock was moved away from the SM_MUTEX to the spinlock. This isn't a correctness issue but it sure isn't good for performance.

Found thanks to Ward.

Fixes #17539 (closed).

Edited by Ben Gamari

Merge request reports