[mercury-users] Parallelizing the garbage collector?

Ondrej Bojar obo at cuni.cz
Wed Mar 22 07:31:53 AEDT 2006


I'm still hoping to use threads in my computations, but as I posted
recently and Peter Ross suggested, Boehm garbage collector wastes far
more time than the parallel processing can bring. After reading some of
the documentation, I believe that the gc needs to stop all the threads
too often to perform collection.

Boehm gc supports some extra flags to improve performance:
-DPARALLEL_MARK for parallel marking and -DTHREAD_LOCAL_ALLOC for
separate collectors for individual threads. (Parallel mark should help 
straight away, thread local needs to be actually used in mmc.)

I tried to add these options to rotd/configure into
CFLAGS_FOR_THREADS for my platform (linux, x64), but mmc compiled with
these extra flags fails to link my programs:


In function `GC_set_fl_marks':
: undefined reference to `GC_compare_and_exchange'

In function `GC_set_mark_bit':
: undefined reference to `GC_compare_and_exchange'

As far as I understand, boehm_gc/configure (which would support option 
--enable-parallel-mark) is not called from generic configure, so I 
cannot check if it would work better.

Would you recommend any workaround?

Or any chances for par.agc grade? (I have not read about accurate gc, 
but I expect it does not need to stop the world to reclaim unused blocks.)

Thanks, Ondrej.

Ondrej Bojar (mailto:obo at cuni.cz)

mercury-users mailing list
post:  mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-users-request at cs.mu.oz.au Message: subscribe

More information about the users mailing list