
On Wed, Oct 27, 2010 at 23:09, Andrew Coppin
On 27/10/2010 05:00 PM, John Lato wrote:
I am somewhat surprised that all capabilities must be ready for GC; I thought with the parallel GC that wouldn't be necessary. But I don't know much about GC implementations so I try not to let their behavior surprise me too much.
GHC has a _parallel_ GC implementation, meaning that the GC event runs in parallel on several cores. But it does not (yet) have _concurrent_ GC, meaning that a GC event can happen at the same time as Haskell threads are running. (Basically, which Haskell code running, the references between objects could change while the GC engine is trying to analyse them, which would be Bad.) I understand that the developers are actively working on fixing this, since it can sometimes have a significant effect on the performance of multicore programs...
I thought that young generations could be GC'ed while other threads were running, while collecting the old generation required synchronizing all threads. This seems to be what is shown on http://hackage.haskell.org/trac/ghc/blog/new-gc-preview as well. Erik