[sgen] Workers dequeue from the distribute gray queue directly.
authorMark Probst <mark.probst@gmail.com>
Wed, 7 Nov 2012 15:58:43 +0000 (16:58 +0100)
committerMark Probst <mark.probst@gmail.com>
Sun, 9 Dec 2012 14:02:46 +0000 (15:02 +0100)
commit76087cedea5ab405ac34179c6933af8ede48f2d3
tree5089362a9aa4eac763b3cbe2a437305a056c2df8
parent2230f884deef9c53a816e21c7eec0c003ddb4703
[sgen] Workers dequeue from the distribute gray queue directly.

Previously we manually fed the workers, only restarting the world
when the distribute gray queue was empty, which neglected most of the
benefit of concurrent collection.  Now we use locking for the queue and
let workers drain it while the world runs again.

If the locking turns out to be a bottleneck we could implement a lock-free
queue.
mono/metadata/sgen-gc.c
mono/metadata/sgen-gray.c
mono/metadata/sgen-gray.h
mono/metadata/sgen-workers.c
mono/metadata/sgen-workers.h